Skip to content

Commit b3dc364

Browse files
authored
[New] Rate Limiting Section (#284)
* initial check in * added object storage information * added a note about other levels of rate limiting outside of the api * removed statement about user quota with multiple tokens * added open support ticket and a note about specific limits below * updated headers downgraded level by one
1 parent 28aaec3 commit b3dc364

File tree

1 file changed

+50
-15
lines changed

1 file changed

+50
-15
lines changed

openapi.yaml

Lines changed: 50 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ info:
44

55
title: Linode API
66
description: |
7-
# Introduction
7+
## Introduction
88
The Linode API provides the ability to programmatically manage the full
99
range of Linode products and services.
1010

@@ -20,19 +20,19 @@ info:
2020
<a target="_top" href="https://developers.linode.com/api/docs/v4/openapi.yaml">Download the Linode OpenAPI Specification</a>.
2121

2222

23-
# Changelog
23+
## Changelog
2424

2525
<a target="_top" href="https://developers.linode.com/changelog">View our Changelog</a> to see release
2626
notes on all changes made to our API.
2727

28-
# Access and Authentication
28+
## Access and Authentication
2929

3030
Some endpoints are publicly accessible without requiring authentication.
3131
All endpoints affecting your Account, however, require either a Personal
3232
Access Token or OAuth authentication (when using third-party
3333
applications).
3434

35-
## Personal Access Token
35+
### Personal Access Token
3636

3737
The easiest way to access the API is with a Personal Access Token (PAT)
3838
generated from the
@@ -42,13 +42,13 @@ info:
4242
All scopes for the OAuth security model ([defined below](#o-auth)) apply to this
4343
security model as well.
4444

45-
### Authentication
45+
#### Authentication
4646

4747
| Security Scheme Type: | HTTP |
4848
|-----------------------|------|
4949
| **HTTP Authorization Scheme** | bearer |
5050

51-
## OAuth
51+
### OAuth
5252
If you only need to access the Linode API for personal use,
5353
we recommend that you create a [personal access token](#personal-access-token).
5454
If you're designing an application that can authenticate with an arbitrary Linode user, then
@@ -65,7 +65,7 @@ info:
6565
- A public client is used with applications where the client secret is not guaranteed to be secure. For example, a native app running on a user's computer may not be able to keep the client secret safe, as a user could potentially inspect the source of the application. So, native apps or apps that run in a user's browser should use a public client.
6666
- Public and private clients follow different workflows, as described below.
6767

68-
### OAuth Workflow
68+
#### OAuth Workflow
6969

7070
The OAuth workflow is a series of exchanges between your third-party app and Linode. The workflow is used
7171
to authenticate a user before an application can start making API calls on the user's behalf.
@@ -86,7 +86,7 @@ info:
8686
| 6. The login server responds to the client application with a new OAuth `access_token` and `refresh_token`. The `access_token` is set to expire in two hours. | |
8787
| 7. The `refresh_token` can be used by contacting the login server with the `client_id`, `client_secret`, `grant_type`, and `refresh_token` to get a new OAuth `access_token` and `refresh_token`. The new `access_token` is good for another two hours, and the new `refresh_token`, can be used to extend the session again by this same method. | |
8888

89-
### OAuth Private Workflow - Additional Details
89+
#### OAuth Private Workflow - Additional Details
9090

9191
The following information expands on steps 5 through 7 of the private workflow:
9292

@@ -126,15 +126,15 @@ info:
126126
Authorization: Bearer 03d084436a6c91fbafd5c4b20c82e5056a2e9ce1635920c30dc8d81dc7a6665c
127127
```
128128

129-
### OAuth Reference
129+
#### OAuth Reference
130130

131131
| Security Scheme Type | OAuth 2.0 |
132132
|-----------------------|--------|
133133
| **Authorization URL** | https://login.linode.com/oauth/authorize |
134134
| **Token URL** | https://login.linode.com/oauth/token |
135135
| **Scopes** | <ul><li>`account:read_only` - Allows access to GET information about your Account.</li><li>`account:read_write` - Allows access to all endpoints related to your Account.</li><li>`domains:read_only` - Allows access to GET Domains on your Account.</li><li>`domains:read_write` - Allows access to all Domain endpoints.</li><li>`events:read_only` - Allows access to GET your Events.</li><li>`events:read_write` - Allows access to all endpoints related to your Events.</li><li>`images:read_only` - Allows access to GET your Images.</li><li>`images:read_write` - Allows access to all endpoints related to your Images.</li><li>`ips:read_only` - Allows access to GET your ips.</li><li>`ips:read_write` - Allows access to all endpoints related to your ips.</li><li>`linodes:read_only` - Allows access to GET Linodes on your Account.</li><li>`linodes:read_write` - Allow access to all endpoints related to your Linodes.</li><li>`lke:read_only` - Allows access to GET LKE Clusters on your Account.</li><li>`lke:read_write` - Allows access to all endpoints related to LKE Clusters on your Account.</li><li>`longview:read_only` - Allows access to GET your Longview Clients.</li><li>`longview:read_write` - Allows access to all endpoints related to your Longview Clients.</li><li>`nodebalancers:read_only` - Allows access to GET NodeBalancers on your Account.</li><li>`nodebalancers:read_write` - Allows access to all NodeBalancer endpoints.</li><li>`stackscripts:read_only` - Allows access to GET your StackScripts.</li><li>`stackscripts:read_write` - Allows access to all endpoints related to your StackScripts.</li><li>`volumes:read_only` - Allows access to GET your Volumes.</li><li>`volumes:read_write` - Allows access to all endpoints related to your Volumes.</li></ul><br />|
136136

137-
# Requests
137+
## Requests
138138

139139
Requests must be made over HTTPS to ensure transactions are encrypted. The
140140
following Request methods are supported:
@@ -147,7 +147,7 @@ info:
147147
| DELETE | Deletes a resource. This is a destructive action. |
148148

149149

150-
# Responses
150+
## Responses
151151

152152
Actions will return one following HTTP response status codes:
153153

@@ -162,7 +162,7 @@ info:
162162
| 429 Too Many Requests | You've hit a rate limit. |
163163
| 500 Internal Server Error | Please [open a Support Ticket](/api/v4/support-tickets/#post). |
164164

165-
# Errors
165+
## Errors
166166

167167
Success is indicated via <a href="https://en.wikipedia.org/wiki/List_of_HTTP_status_codes" target="_top">Standard HTTP status codes</a>.
168168
`2xx` codes indicate success, `4xx` codes indicate a request error, and
@@ -186,7 +186,7 @@ info:
186186
omitted if there is no relevant field. The `reason` is a human-readable
187187
explanation of the error, and will always be included.
188188

189-
# Pagination
189+
## Pagination
190190

191191
Resource lists are always paginated. The response will look similar to this:
192192

@@ -208,7 +208,7 @@ info:
208208
and can be set to return between 25 and 500. Page size can be set using
209209
`?page_size=x`.
210210

211-
# Filtering and Sorting
211+
## Filtering and Sorting
212212

213213
Collections are searchable by fields they include, marked in the spec as
214214
`x-linode-filterable: true`. Filters are passed
@@ -323,7 +323,42 @@ info:
323323
}'
324324
```
325325

326-
# CLI (Command Line Interface)
326+
## Rate Limiting
327+
328+
With the Linode API, you can make up to 1,600 general API requests every two minutes per user as
329+
determined by IP adddress or by OAuth token. Additionally, there are endpoint specfic limits defined below.
330+
331+
**Note:** There may be rate limiting applied at other levels outside of the API, for example, at the load balancer.
332+
333+
`/stats` endpoints have their own dedicated limits of 100 requests per minute per user.
334+
These endpoints are:
335+
336+
* [View Linode Statistics](https://api.linode.com/v4/linode/instances/{linodeId}/stats)
337+
* [View Linode Statistics (year/month)](https://api.linode.com/v4/linode/instances/{linodeId}/stats/{year}/{month})
338+
* [View NodeBalancer Statistics](https://api.linode.com/v4/nodebalancers/{nodeBalancerId}/stats)
339+
* [List Managed Stats](https://api.linode.com/v4/managed/stats)
340+
341+
Object Storage endpoints have a dedicated limit of 750 requests per second per user.
342+
These endpoints are:
343+
344+
* [List and Create Object Storage Buckets](https://developers.linode.com/api/v4/object-storage-buckets)
345+
* [View and Remove Object Storage Buckets](https://developers.linode.com/api/v4/object-storage-buckets-cluster-id-bucket)
346+
* [List Object Storage Buckets in Cluster](https://developers.linode.com/api/v4/object-storage-buckets-cluster-id)
347+
* [Modify Object Storage Bucket Access](https://developers.linode.com/api/v4/object-storage-buckets-cluster-id-bucket-access/#post)
348+
* [List Object Storage Bucket Contents](https://developers.linode.com/api/v4/object-storage-buckets-cluster-id-bucket-object-list)
349+
* [Create Object Storage Object URL](https://developers.linode.com/api/v4/object-storage-buckets-cluster-id-bucket-object-url/#post)
350+
* [List Clusters](https://developers.linode.com/api/v4/object-storage-clusters)
351+
* [View Cluster](https://developers.linode.com/api/v4/object-storage-clusters-cluster-id)
352+
* [List and Create Object Storage Keys](https://developers.linode.com/api/v4/object-storage-keys)
353+
* [View, Update, and Revoke an Object Storage Key](https://developers.linode.com/api/v4/object-storage-keys-key-id)
354+
* [Cancel Object Storage](https://developers.linode.com/api/v4/object-storage-cancel/#post)
355+
356+
Opening Support Tickets has a dedicated limit of 2 requests per minute per user.
357+
That endpoint is:
358+
359+
* [Open Support Ticket](https://developers.linode.com/api/v4/support-tickets/#post)
360+
361+
## CLI (Command Line Interface)
327362

328363
The <a href="https://github.com/linode/linode-cli" target="_top">Linode CLI</a> allows you to easily
329364
work with the API using intuitive and simple syntax. It requires a

0 commit comments

Comments
 (0)