HTTP Responses
Anodot APIs use standard HTTP status codes to indicate the success or failure of a request.
An error status code indicates that the service was unable to process the request. In such cases, the response may include a JSON object with an errors array containing detailed error information (see Error Response Format below).
In some cases, the service may successfully process the request but encounter partial issues (for example, one metric has an invalid timestamp while others are valid). In these scenarios, the HTTP status code will indicate success, and the response body will include the expected result along with an errors array detailing the issues.
HTTP Status Codes
| Status Code | Meaning |
|---|---|
| 200 | OK |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 500 | Server Error |
Error Response Fields
| Field | Description |
|---|---|
| errors | Array of errors returned in the request. |
| index | Index of the faulty entry (relevant for batch requests). |
| error | Error code. |
| description | Error description (see Anodot Error Codes) |
{
“errors”:[
{
"index":"failed sample index",
“error”: "<error code>",
“description”:”error description”
}
]
}