HTTP Verb: GET

Available statuses: 200 OK, 404 Not Found

Object: UserRole

Location: n/a

Formats: XML, JSON

Returns a user role by id.

Params

Not available

Examples

Request XML, using cURL utility:

curl -i -H "Authorization: Bearer _token" https://api.assembla.com/v1/spaces/_space_id/user_roles/_id.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-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>

Request JSON, using cURL utility:

curl -i -H "Authorization: Bearer _token" https://api.assembla.com/v1/spaces/_space_id/user_roles/_id.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