Status Codes¶
All status codes are standard HTTP status codes. The below ones are used in this API. The operations of the legacy feed (paths under /api/idata/) give the same code in the StatusCode field of their response envelope, with Status ESUCC on success and EFAIL on an error, the reason in Message and Result null. Refusals made before the operation runs (401, 403, 429 and an authentication 503) are not in the envelope: they are a JSON object {"status": "error", "message": "..."} whose message says what is wrong.
2XX -Success of some kind
4XX -Error occurred in the client’s part
5XX -Error occurred in the server’s part
| Status Code | Description |
|---|---|
| 200 | OK |
| 201 | Created: a request that records something, such as a scraper request, was recorded |
| 400 | Bad request: a missing, malformed or unknown parameter; the message names it |
| 401 | Authentication failure: a missing, unknown, revoked or expired API key, or a request that sends only the old AppKey header |
| 403 | Forbidden: the key's permissions or plan do not include this operation, the account is suspended, or the request comes from an address or origin the account does not allow |
| 404 | Resource not found: no operation at this path, or no data for the identifiers requested |
| 405 | Method Not Allowed: for example a POST to an operation that answers GET only |
| 409 | Conflict: the request clashes with the current state of what it changes, for example a scraper request already decided |
| 410 | Gone: the data was deleted at the end of its retention period |
| 415 | Unsupported Media Type: a request body in a format the operation does not read |
| 422 | Unprocessable: too little data for the computation asked, for example too short a series to forecast |
| 429 | Too Many Requests: the key's rate limit per minute or its monthly quota is used up |
| 500 | Internal Server Error |
| 501 | Not Implemented: an operation that is listed but not served yet |
| 503 | Service Unavailable: a service the operation needs, or the key check, is not reachable; retry later |