API reference
Errors.
Clear about what went wrong.
When a request fails, you get an HTTP status and an error object that says what went wrong. Use code in your own code: it stays the same, while message is written for people.
The error object
- error.codestringrequired
What went wrong, as a short code. Use this in your code.
- error.messagestringrequired
What went wrong, in words.
- error.paramstring
The field in your request that caused it, such as
end. Not included when no single field did. - error.request_idstringrequired
The ID of this request. Include it if you contact support.
Example response
{ "error": { "code": "invalid_time_range", "message": "end must be at least a second after start.", "param": "end", "request_id": "4b1f0c9e2d7a48b6a3e5f19c0d8b7a26" }}All errors
4xx errors mean something in the request needs to change. 5xx errors are on our side.
| Error | What it means |
|---|---|
400invalid_request | Something in the request is wrong, such as a missing field, a field the endpoint doesn’t take, or a value that isn’t allowed. param names the field. A body larger than 1 MiB gets this code with a 413. |
400invalid_cursor | The cursor isn’t valid. Start again from the first page. |
400invalid_time_range | start and end don’t make a time range Ollive can read. For example, end must be at least a second after start. param names the field to fix. |
400unsupported_metric | That combination of measure and group_by isn’t available. |
401not_authenticated | The request has no API key. |
401authentication_failed | The API key is wrong, revoked or expired. |
403permission_denied | This API key doesn’t have access. Contact support. |
404not_found | There is no endpoint at that URL. Check the path, and leave off any trailing slash. A request whose IDs match nothing gets an empty list, not this error. |
405method_not_allowed | Every endpoint uses POST. |
429throttled | Too many requests. Wait for the number of seconds in the Retry-After header, then try again. |
500internal_error | Something went wrong on our side. Try again. If it keeps happening, contact support with the request ID. |
Trying again
429: wait for the number of seconds in theRetry-Afterheader, then send the same request again.500: wait a moment and try again. If it keeps happening, contact support with the request ID.- Other
4xxerrors will happen again until you fix the request.