Skip to content

Commit 62e6244

Browse files
author
Josh Sager
committed
Addressed PR feedback
1 parent 3dff61a commit 62e6244

File tree

1 file changed

+23
-36
lines changed

1 file changed

+23
-36
lines changed

openapi.yaml

Lines changed: 23 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -27,32 +27,29 @@ info:
2727
2828
## Personal Access Token
2929
30-
You must request an access code that can then be exchanged for an
31-
authorization token. A Personal Access Token (PAT) is an
32-
[OAuth 2.0](https://oauth.net/2/) Access Token that you can generate via the
30+
The easiest way to access the API is with a Personal Access Token (PAT)
31+
generated from the
3332
[Linode Cloud Manager](https://cloud.linode.com/profile/tokens). You must
34-
create a Personal Access Token to use the API. If you are consuming the API
35-
for yourself only and do not intend on creating an application, a Personal
36-
Access Token is all you need.
33+
create a Personal Access Token to use the API. In most cases, a Personal
34+
Access Token is all you need to consume the API.
3735
38-
The authorization token can then be used to make requests against our API.
39-
40-
All scopes for the `oauth` security model (defined below), apply to this
36+
All scopes for the `oauth` security model (defined below) apply to this
4137
security model as well.
4238
4339
## OAuth
4440
45-
The OAuth workflow is a two-step process to authenticate a user before the
46-
user (or an application on the user's behalf) can start making API calls.
41+
The OAuth workflow is a three-step process to authenticate a user before an
42+
application can start making API calls on the user's behalf.
4743
48-
The user logs in to Linode and is presented the scope levels your
49-
application is requesting. Once the user accepts your request for access,
50-
we redirect them back to you with an access code. You may then exchange the
51-
access code for an authorization token.
44+
First, the user visits the application's website and is directed to log with
45+
Linode. The user is then redirected to Linode's authentication server and
46+
presented the scope levels the application is requesting. Once the user
47+
accepts the request for access, we redirect them back to the application's
48+
specified redirect URI with an access code.
5249
5350
Once the user has logged in to Linode and you have received an access code,
5451
you will need to exchange that access code for an Authorization token. You
55-
do this by making the following HTTP POST request:
52+
do this by making an HTTP POST request to the following address:
5653
5754
```
5855
https://login.linode.com/oauth/token
@@ -97,9 +94,9 @@ info:
9794
| METHOD | USAGE |
9895
|--------|-------|
9996
| GET | Retrieves data about collections and individual resources. |
100-
| POST | Creates a new resource, such as a Linode Instance, NodeBalancer, Volume, etc. |
97+
| POST | For collections, creates a new resource of that type. Also used to perform actions on action endpoints. |
10198
| PUT | Updates an existing resource. |
102-
| DELETE | Deletes a resource. In virtually all cases this is a destructive action. |
99+
| DELETE | Deletes a resource. This is a destructive action. |
103100
104101
105102
# Responses
@@ -109,6 +106,7 @@ info:
109106
| STATUS | DESCRIPTION |
110107
|---------|-------------|
111108
| 200 OK | The request was successful |
109+
| 204 No Content | The server successfully fulfilled the request and there is no additional content to send. |
112110
| 400 Bad Request | You submitted an invalid request (missing parameters, etc.). |
113111
| 401 Unauthorized | You failed to authenticate for this resource. |
114112
| 403 Forbidden | You are authenticated, but don't have permission to do this. |
@@ -119,23 +117,12 @@ info:
119117
# Errors
120118
121119
Success is indicated via [Standard HTTP status codes](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes).
122-
`2xx` codes indicate success, `4xx` codes indicate an
123-
error on your side, and `5xx` errors indicate an error on our side. An error
124-
on your side might be an invalid input, a required parameter being omitted,
125-
etc. Errors on our side shouldn't happen often. If an error does occur, please
126-
let us know.
127-
128-
Requests that return errors will look like this:
129-
130-
```Shell
131-
{
132-
"errors": [
133-
{
134-
"reason": "Invalid JSON"
135-
}
136-
]
137-
}
138-
```
120+
`2xx` codes indicate success, `4xx` codes indicate a request error, and
121+
`5xx` errors indicate a server error. A
122+
request error might be an invalid input, a required parameter being omitted,
123+
or a malformed request. A server error means something went wrong processing
124+
your request, and we'll fix it shortly. If this occurs, please
125+
[open a Support Ticket](/#operation/createTicket) and let us know.
139126
140127
The `errors` field is an array of the things that went wrong with your request.
141128
We will try to include as many of the problems in the response as possible,
@@ -8853,7 +8840,7 @@ paths:
88538840
https://api.linode.com/v4/volumes/12345/resize
88548841
- lang: CLI
88558842
source: >
8856-
linode-cli volumes resize 12345 --size 301
8843+
linode-cli volumes resize 12345 --size 30
88578844
88588845
components:
88598846
securitySchemes:

0 commit comments

Comments
 (0)