Rate limits

To ensure fair use of the Skovik API, we enforce rate limiting on all API endpoints.

The request rate limit is enforced over two categories of requests, GET requests and all others.
You may send 1200 GET requests per minute (20 requests per second, sustained over a minute).
For all other types of requests (POST, PATCH, and DELETE), the limit is 300 requests per
minute (5 requests per second, sustained over a minute).

Exceeding the limit will block the request.

We expect a well-implemented API client to handle rate limiting gracefully,
and take into account that the actual limits may change over time.

The backend will respond with the status code 429 Too Many Requests
and a response that looks like this when a rate-limit is exceeded.

HTTP/1.1 429 Too Many Requests
Cache-Control: no-cache
Content-Type: application/json; charset=utf-8
Retry-After: 27
Vary: Origin
X-Request-Id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Date: Wed, 20 Apr 2022 08:56:33 GMT
Transfer-Encoding: chunked

{
  "errors": [
    {
      "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "status": "429",
      "title": "Too Many Requests",
      "detail": "Request count (301) exceeded the limit (300) for a period of 60 seconds",
      "meta": {
        "retry_after": 27,
        "rate_period": 60,
        "rate_limit": 300
      }
    }
  ]
}

The header Retry-After
(more about this header)
specifies how long you must wait, in seconds, before retrying.

Additional information about rate limiting is available under the errors[0].meta key.