Calling conventions
The API consists of HTTP RPC-style methods, all of the form https://server/services/v1/METHOD.
All methods must be called using HTTPS. Arguments can be passed as GET or POST params, or a mix. The response contains a JSON object, which will always contain a top-level boolean property ok, indicating success or failure. For failure results, the error property will contain a short machine-readable error code along optional error data.
{
"ok": true,
"data": "Service returned data"
}
{
"ok": false,
"error": "error_code",
"data": "Optional data about the error"
}
Headers
All operations must contain the appropriate authorization
token:
--header 'authorization: Bearer xxxxx...'
And the accept
and content-type
headers:
--header 'accept: application/json' \
--header 'content-type: application/json'