To keep the Gridshare API reliable for everyone, requests to the Partner API are rate limited. Limits are applied per partner account, so one partner's traffic never uses up another partner's allowance.
There are two kinds of limit:
- Request rate: a limit on how many requests you can send per second, including short bursts.
- Daily quota: a limit on the total number of requests you can send in a day.
Most integrations will never reach either limit. We set them well above typical usage, and they exist mainly to protect your integration and ours from a misbehaving client, such as a retry loop that has gone wrong.
Recognising a rate limited request
When you go over a limit, the API responds with HTTP status 429 Too Many Requests and a small JSON body.
Exceeding the request rate:
{ "message": "Too Many Requests" }Exceeding the daily quota:
{ "message": "Limit Exceeded" }A 429 means the request was not processed, so it is safe to send it again later.
Handling rate limits
- Check for
429on every request and don't treat it as a permanent failure. - Back off and retry. If you receive
Too Many Requests, wait and retry with exponential backoff (for example 1s, 2s, 4s, …) and some random jitter, and give up after a sensible number of attempts. - Don't retry straight away in a tight loop. Immediate retries keep you over the limit for longer.
- A
Limit Exceededresponse won't clear by retrying quickly. The daily quota resets at the start of the next day (UTC). If you see this repeatedly, contact us (see below) rather than retrying. - Spread out your requests. If you need data for many sites or devices, send requests at a steady pace rather than in a single burst.
- Use the WebSocket API for live data. To receive telemetry and device events as they happen, use the WebSocket API (see the WebSocket Connections page) instead of polling the REST API.
Requesting a higher limit
If your integration is regularly hitting a limit, or you expect your usage to grow, we can review your account and increase your limits.
Email [email protected] with:
- your account name,
- which limit you're hitting (request rate or daily quota),
- roughly how many requests you expect to make, and how often, and
- what the integration is doing, so we can see whether there's a more efficient way to get the data.