HTTP Verb: GET

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

Object: User Role

Location: n/a

Formats: XML, JSON

Returns a list of invitations (user roles) which haven't been accepted.

Params

Not available

Examples

Request XML, using cURL utility:

curl -i -H "Authorization: Bearer _token" https://_portfolio_subdomain.api.assembla.com/v1/invitations.xml

Response:

HTTP/1.1 200 OK
Server: nginx/0.8.55
Date: Fri, 07 Sep 2012 13:08:42 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>
    <id type="integer">324</id>
    <user-id>cH_-A8Oo8r4QWQ5bfBjDYC</user-id>
    <space-id>cJiq3KDNyr4PMj5bfBjDYC</space-id>
    <role>member</role>
    <status type="integer">1</status>
    <invited-time type="datetime">2013-05-21T05:02:17-05:00</invited-time>
    <agreed-time nil="true"></agreed-time>
    <title nil="true"></title>
    <invited-by-id>dd_iFeDNur4PMj5bfBjDYC</invited-by-id>
  </user-role>
  ...
</user-roles>

Request JSON, using cURL utility:

curl -i -H "Authorization: Bearer _token" https://_portfolio_subdomain.api.assembla.com/v1/invitations.json

Response:

HTTP/1.1 200 OK
Server: nginx/0.8.55
Date: Fri, 07 Sep 2012 13:12:30 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Status: 200
...

[
  {
    "id": 324,
    "user_id": "cH_-A8Oo8r4QWQ5bfBjDYC",
    "space_id": "cJiq3KDNyr4PMj5bfBjDYC",
    "role": "member",
    "status": 1,
    "invited_time": "2013-05-21T05:02:17-05:00",
    "agreed_time": null,
    "title": null,
    "invited_by_id": "dd_iFeDNur4PMj5bfBjDYC"
  },
  ...
]

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