Following is the general form of a RESTful Resource that these requests and associated responses will take, including relevant HTTP headers and response codes. For brevity, this information will not be repeated in the documentation for the individual API endpoints and only the properties needed in the request and returned in the response will be listed. Note that the JSON responses have no root and pagination information will be returned via headers.

All requests are HTTP/1.1. If a response body is not specified, one may be returned but should not be expected.


List

GET the "collection resource".

GET /api/v1/resources
Authorization: Token ...
Accept: application/json
Accept-Language: en-ca,en;q=0.8,en-us;q=0.6,de-de;q=0.4,de;q=0.2
200 OK
Content-Type: application/json
X-Total-Count: 4022
[
  {
    "property1": value1,
    "property2": value2,
    ...
  },
  ...
]

Pagination

Parameters page and per_page may be specified in a query string, and a header X-Total-Count may be returned with the approximate total number of resources.

GET /api/v1/resources?page=2&per_page=50
Authorization: Token ...
Accept: application/json
Accept-Language: en-ca,en;q=0.8,en-us;q=0.6,de-de;q=0.4,de;q=0.2
200 OK
Content-Type: application/json
X-Total-Count: 4022
[
  {
    "property1": value1,
    "property2": value2,
    ...
  },
  ...
]

GET the "resource".

GET /api/v1/resources/{id}
Authorization: Token ...
Accept: application/json
Accept-Language: en-ca,en;q=0.8,en-us;q=0.6,de-de;q=0.4,de;q=0.2
200 OK
Content-Type: application/json
{
  "property1": value1,
  "property2": value2,
  ...
}

POST to the "collection resource". This creates a new instance of the resource.

POST /api/v1/resources
Authorization: Token ...
Accept: application/json
Accept-Language: en-ca,en;q=0.8,en-us;q=0.6,de-de;q=0.4,de;q=0.2
Content-Type: application/json
{
  "property1": value1,
  "property2": value2,
  ...
}
201 Created
Content-Type: application/json
Location: https://hostname/api/v1/resources/{id}
{
  "property1": value1,
  "property2": value2,
  ...
}

PUT the "resource". This modifies the provided properties without changing the others.

PUT /api/v1/resources/{id}
Authorization: Token ...
Accept: application/json
Accept-Language: en-ca,en;q=0.8,en-us;q=0.6,de-de;q=0.4,de;q=0.2
Content-Type: application/json
{
  "property1": value1,
  "property2": value2,
  ...
}
204 No Content

DELETE the "resource".

DELETE /api/v1/resources/{id}
Authorization: Token ...
Accept: application/json
Accept-Language: en-ca,en;q=0.8,en-us;q=0.6,de-de;q=0.4,de;q=0.2
204 No Content
Video player

Video

×

Reset your Password Password resets are handled on the Support Site

×