2xx means success. 4xx means a
problem with the request, such as a missing parameter or missing permissions.
5xx means an unexpected error on the server.
Error response shape
Every error response has the same JSON body, with a singlemessage field.
Status codes
Handling errors
Whether to retry depends on the status code:400,403,404,409,422. The same request will fail again. Fix the input, adjust the scope or use a token with the right permissions, then resend.401. Check thex-api-keyheader and that the token has not expired.429. Wait the number of seconds in theRetry-Afterheader, then retry. See Rate limiting.500. Usually transient. Retry with exponential backoff, and contact support if it persists.
Query too expensive (422)
The Fetch sensor data endpoint returns
422 when a query is too broad to finish within the server’s time limit. The
usual cause is a wide or unbounded time range across many parameters or
devices. To fix it:
- Narrow the time range set by
startDateandendDate. - Reduce the number of parameters, devices, or sensors in a single request.
- Apply an
aggregationinterval to downsample the result.
Rate limiting
Each API token has a rate limit. The default is 200 requests per minute over a rolling window. Every response carries these headers:
Rejected requests do not count against your quota. A request over the limit
gets this response:
- Fetch several devices or parameters in one Fetch sensor data call instead of one request each.
- Poll no faster than your devices transmit. Sensor data only changes when a device transmits.