For every request, a standard HTTP response code is returned. Most responses include content, particularly the error codes include details about what went wrong.
Successful requests
When a request succeeds, a corresponding response code is returned. If specific data is requested, the data is also returned. The returned data content and format vary with the API requests. For details, see Write data and Query data.
Failed requests
When an error occurs, the API returns a formatted JSON object for the error. The object’s fields include:
Field | Type | Required or not | Description | Example |
---|---|---|---|---|
code | Integer | Yes | HTTP status code | 400 |
message | String | Yes | Brief error description | Missing required parameter |
details | String | Optional | Detailed error description | Missing value: type |
Every error response includes an HTTP response code and a content body with error details.
Example Error Response
{
"error": {
"code": 400,
"message": "Missing parameter <code>type</code>"
}
}