HTTP Verb: GET

Available statuses: 200 OK, 204 No Content, 404 Not Found

Object: UserRole

Location: n/a

Formats: XML, JSON

Returns a list of user roles in a space.

Params

Not available

Examples

Request XML, using cURL utility:

curl -i -H "Authorization: Bearer _token" https://www.assembla.com/v1/spaces/_space_id/user_roles.xml

Response:

HTTP/1.1 200 OK
Server: nginx/0.8.55
Date: Mon, 10 Sep 2012 11:16:59 GMT
Content-Type: application/xml; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Status: 200
...

<?xml version="1.0" encoding="UTF-8"?>
<user-roles type="array">
  <user-role>
    <invited-by-id nil="true"></invited-by-id>
    <agreed-time type="datetime">2011-06-23T12:06:26Z</agreed-time>
    <status type="integer">2</status>
    <space-id>b89TL8MYWr4id7adbNA33N</space-id>
    <user-id>bgnP_qA1Gr2QjIaaaHk9wZ</user-id>
    <invited-time type="datetime">2011-06-23T12:06:19Z</invited-time>
    <id type="integer">4</id>
    <title>Master</title>
    <role>owner</role>
  </user-role>
  ...
</user-roles>

Request JSON, using cURL utility:

curl -i -H "Authorization: Bearer _token" https://www.assembla.com/v1/spaces/_space_id/user_roles.json

Response:

HTTP/1.1 200 OK
Server: nginx/0.8.55
Date: Mon, 10 Sep 2012 11:17:50 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Status: 200
...

[
  {
    "invited_by_id":null,
    "agreed_time":"2011-06-23T12:06:26Z",
    "status":2,
    "space_id":"b89TL8MYWr4id7adbNA33N",
    "user_id":"bgnP_qA1Gr2QjIaaaHk9wZ",
    "invited_time":"2011-06-23T12:06:19Z",
    "id":4,
    "title":"Master",
    "role":"owner"
  },
  ...
]

JSON is formatted here for readability, in a real response JSON body is inline with no indentation.

Description for each field: user role object fields reference