To fetch metadata of User Role object send a GET request to:

https://api.assembla.com/v1/meta/user_roles.(json|xml)

Example. Request JSON with cURL utility:

curl -H "Authorization: Bearer _token" https://api.assembla.com/v1/meta/user_roles.json

Example. Request XML with cURL utility:

curl -H "Authorization: Bearer _token" https://api.assembla.com/v1/meta/user_roles.xml

Table below is the list of fields contained in the response, this list will be properly formatted to JSON or XML as requested.

Fields

Param Data type Access Description
id integer read User role identifier
user_id string read The user instance is associated with
space_id string read ID of space user role instance is associated with
role string read/write User role, possible values are: watcher, member, owner
status integer read Status of user in space:
  • 1, Invited
  • 2, Accepted invitation
  • 3, Removed from space
invited_time datetime read Date and time user was invited to space
agreed_time datetime read Date and time user agreed to join the space
title string read/write Title of space member
invited_by_id string read ID of inviter
message text write Add an invitation message when create a user role
Note: Available only on create request

Validations

Field Validator Description
user_id uniqueness validator In scope of space, user_id should be unique, only one user role per user is allowed for one space.