The resources in this API use JSON-formatted OData as the default protocol for accessing data. Other Web service formats are supported, including OData (Atom), SOAP, HTML, and CSV.
Resources are endpoints that are typically a collection of items. Resources can be accessed using the following HTTP methods:
Actions can be used to extend the set of operations on resources or can be used to execute unrelated actions on the server.
200 OK | The request was processed by the server without error. |
201 Created | The request was successful and the specified resource was created by the server. |
204 No Content | A request returns this status if the requested resource has a null value or the service applies a return=minimal preference. |
400 Bad Request | The request was not understood or was missing required parameters. |
401 Unauthorized | The user was not authenticated or authorized to access this resource. |
403 Forbidden | Access is denied to this resource. |
404 Not Found | This response indicates the resource does not exist. |
405 Method Not Allowed | The HTTP method specified is not allowed to this resource. |
501 Not Implemented | The server does not support the functionality required to fulfill the request. |
Authtokens are unique identifiers that users authenticate to APIs with. To use an authtoken, log in as an administrator and then click User Management. In this section, you can manage users' permissions and authtokens. You can also restrict access of APIs to specific IP addresses.
To call the API, you can specify the authtoken a number of ways.
The user's authtoken should be used as the password when using Basic Authentication.
Add the HTTP header "x-cdata-authtoken" with the desired authtoken as part of the HTTP request.
Specify the authtoken as "@authtoken" as part of HTTP form-post data or a query parameter.
In addition to the default JSON OData format that all API resources and actions support, the following Web service formats are supported in all APIs. The Input column describes the additional inputs required to request the specific format.
Format | Input | Description |
---|---|---|
OData (Atom) | $format=Atom | An alternative XML item encoding for OData. |
JSONP | $callback=MyCallback | Output is converted into JSONP format for use in browser scripts. |
HTML | @HTML | Output is formatted as a basic HTML table. |
CSV | @CSV | Output is converted into comma-separated values for loading into spreadsheets. |
TSV | @TSV | Output is converted into tab-separated values for loading into spreadsheets. |