Skip to content

Commit c0f1e9b

Browse files
committed
Add Rate Limit sections, HTTP headers, global collection limits
1 parent 99b04b8 commit c0f1e9b

File tree

1 file changed

+29
-12
lines changed

1 file changed

+29
-12
lines changed

openapi.yaml

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -341,39 +341,56 @@ info:
341341

342342
## Rate Limiting
343343

344-
With the Linode API, you can make up to 1,600 general API requests every two minutes per user as
345-
determined by IP address or by OAuth token. Additionally, there are endpoint specific limits defined below.
344+
Rate limits on API requests help maintain the health and stability of the Linode API. Accordingly, every endpoint of the Linode API applies a rate limit on a per user basis as determined by OAuth token for authenticated requests or IP address for public endpoints.
345+
346+
Each rate limit consists of a total number of requests and a time window. For example, if an endpoint has a rate limit of 800 requests per minute, then up to 800 requests over a one minute window are permitted. Subsequent requests to an endpoint after hitting a rate limit return a 429 error. You can successfully remake requests to that endpoint after the rate limit window resets.
347+
348+
### Linode APIv4 Rate Limits
349+
350+
With the Linode API, you can generally make up to 1,600 general API requests every two minutes. Additionally, all endpoints have a rate limit of 800 requests per minute unless otherwise specified below.
346351

347352
**Note:** There may be rate limiting applied at other levels outside of the API, for example, at the load balancer.
348353

349-
Creating Linodes has a dedicated limit of 10 requests per 30 seconds per user.
350-
That endpoint is:
354+
Creating Linodes has a dedicated rate limit of 10 requests per 30 seconds. That endpoint is:
351355

352356
* [Linode Create](/docs/api/linode-instances/#linode-create)
353357

354-
`/stats` endpoints have their own dedicated limits of 100 requests per minute per user.
355-
These endpoints are:
358+
`/stats` endpoints have their own dedicated rate limits of 100 requests per minute. These endpoints are:
356359

357360
* [View Linode Statistics](/docs/api/linode-instances/#linode-statistics-view)
358361
* [View Linode Statistics (year/month)](/docs/api/linode-instances/#statistics-yearmonth-view)
359362
* [View NodeBalancer Statistics](/docs/api/nodebalancers/#nodebalancer-statistics-view)
360363
* [List Managed Stats](/docs/api/managed/#managed-stats-list)
361364

362-
Object Storage endpoints have a dedicated limit of 750 requests per second per user.
363-
The Object Storage endpoints are:
365+
Object Storage endpoints have a dedicated rate limit of 750 requests per second. The Object Storage endpoints are:
364366

365367
* [Object Storage Endpoints](/docs/api/object-storage/)
366368

367-
Opening Support Tickets has a dedicated limit of 2 requests per minute per user.
368-
That endpoint is:
369+
Opening Support Tickets has a dedicated rate limit of 2 requests per minute. That endpoint is:
369370

370371
* [Open Support Ticket](/docs/api/support/#support-ticket-open)
371372

372-
Accepting Service Transfers has a dedicated limit of 2 requests per minute per user.
373-
That endpoint is:
373+
Accepting Service Transfers has a dedicated rate limit of 2 requests per minute. That endpoint is:
374374

375375
* [Service Transfer Accept](/docs/api/account/#service-transfer-accept)
376376

377+
All GET requests to endpoints that return a data collection have dedicated rate limits of 100 requests per minute and 10 requests per second.
378+
379+
### Rate Limit HTTP Response Headers
380+
381+
The Linode API includes the following HTTP response headers which are designed to help you avoid hitting rate limits that might disrupt your applications:
382+
383+
* **X-RateLimit-Limit**: The maximum number of permitted requests during the rate limit window for this endpoint.
384+
* **X-RateLimit-Remaining**: The remaining number of permitted requests in the current rate limit window.
385+
* **X-RateLimit-Reset**: The time when the current rate limit window rests in UTC epoch seconds.
386+
* **Retry-After**: The remaining time in seconds until the current rate limit window resets.
387+
388+
There are many ways to access header information for your requests, depending on how you are accessing the Linode API. For example, to view HTTP response headers when making requests with `curl`, use the `-i` or `--include` option as follows:
389+
390+
```Shell
391+
curl -i https://api.linode.com/v4/regions
392+
```
393+
377394
## CLI (Command Line Interface)
378395

379396
The <a href="https://github.com/linode/linode-cli" target="_top">Linode CLI</a> allows you to easily

0 commit comments

Comments
 (0)