Skip to content

Commit 8d5cdc6

Browse files
author
Josh Sager
committed
Addressed feedback, added CLI to introduction
1 parent e745f20 commit 8d5cdc6

File tree

1 file changed

+60
-50
lines changed

1 file changed

+60
-50
lines changed

openapi.yaml

Lines changed: 60 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ info:
2020
2121
# Changelog
2222
23-
[View our Changelog](/changelog) to see release notes on all changes made to
24-
our API.
23+
[View our Changelog](https://developers.linode.com/changelog) to see release
24+
notes on all changes made to our API.
2525
2626
# Access
2727
@@ -42,15 +42,16 @@ info:
4242
## OAuth
4343
4444
The OAuth workflow is a three-step process to authenticate a User before an
45-
application can start making API calls on the User's behalf.
45+
application can start making API calls on the User's behalf. If all you need
46+
is a Personal Access Token, feel free to skip ahead to the next section.
4647
4748
First, the User visits the application's website and is directed to log with
4849
Linode. The User is then redirected to Linode's authentication server and
4950
presented the scope levels the application is requesting. Once the User
5051
accepts the request for access, we redirect them back to the application's
5152
specified redirect URI with an access code.
5253
53-
Once the User has logged in to Linode and you have received an access code,
54+
Once the User has logged in to Linode and you have received an exchange code,
5455
you will need to exchange that access code for an Authorization token. You
5556
do this by making an HTTP POST request to the following address:
5657
@@ -265,6 +266,16 @@ info:
265266
]
266267
}'
267268
```
269+
270+
# CLI (Command Line Interface)
271+
272+
An _early access_ version of the [Linode CLI](https://bits.linode.com/LinodeAPI/linode-cli)
273+
is now available to use. It requires a [Personal Access Token](/#section/Personal-Access-Token)
274+
for authentication, and gives you access to all of the features and functionality
275+
of the Linode API that are documented here with CLI examples.
276+
277+
Endpoints that do not have CLI examples are currently unavailable through the CLI, but
278+
can be access via other methods such as Shell commands and other third-party applications.
268279
contact:
269280
name: Linode
270281
url: /
@@ -368,7 +379,7 @@ paths:
368379
This endpoint allows you to add/edit credit card information to your Account.
369380
370381
Only one credit card can be associated with your Account, so using this
371-
endpoint will overwrite any existing card information with the
382+
endpoint will overwrite your currently active card information with the
372383
new credit card.
373384
operationId: createCreditCard
374385
x-linode-cli-action: update-card
@@ -1519,11 +1530,6 @@ paths:
15191530
description: >
15201531
The new User's email address.
15211532
1522-
password:
1523-
type: string
1524-
description: >
1525-
The password this User will use to log in.
1526-
example: hunter7
15271533
responses:
15281534
'200':
15291535
description: New User created successfully.
@@ -1700,7 +1706,7 @@ paths:
17001706
'204':
17011707
description: >
17021708
This is an unrestricted User, and therefore has no grants to return.
1703-
this User may access everything on the account and perform all actions.
1709+
This User may access everything on the account and perform all actions.
17041710
default:
17051711
$ref: '#/components/responses/ErrorResponse'
17061712
x-code-samples:
@@ -2564,30 +2570,30 @@ paths:
25642570
25652571
Linodes can be created in a number of ways:
25662572
2567-
- Using a Linode Linux Distribution image or an image you created based on another Linode
2568-
- The Linode will be `running` after it completes `provisioning`
2569-
- A default config with two disks, one being a 512 swap disk, is created
2570-
- `swap_size` can be used to customize the swap disk size
2571-
- Requires a `password` be supplied to use for the root User's account
2572-
- It is recommended to supply ssh keys for the root User using the `authorized_keys` field
2573+
* Using a Linode Linux Distribution image or an image you created based on another Linode
2574+
* The Linode will be `running` after it completes `provisioning`
2575+
* A default config with two disks, one being a 512 swap disk, is created
2576+
* `swap_size` can be used to customize the swap disk size
2577+
* Requires a `root_pass` be supplied to use for the root User's account
2578+
* It is recommended to supply ssh keys for the root User using the `authorized_keys` field
25732579
2574-
- Using one of your own StackScripts or a public StackScript
2575-
- The Linode will be `running` after it completes `provisioning`
2576-
- Requires a compatible Linode Linux Distribution `image` to be supplied
2577-
- see [GET /linode/stackscript/{stackscriptId}](/#operation/getStackScript) for compatible images
2578-
- Requires a `root_pass` be supplied to use for the root User's account
2579-
- It is recommended to supply ssh keys for the root User using the `authorized_keys` field
2580+
* Using one of your own StackScripts or a public StackScript
2581+
* The Linode will be `running` after it completes `provisioning`
2582+
* Requires a compatible Linode Linux Distribution `image` to be supplied
2583+
* See [GET /linode/stackscript/{stackscriptId}](/#operation/getStackScript) for compatible images
2584+
* Requires a `root_pass` be supplied to use for the root User's account
2585+
* It is recommended to supply ssh keys for the root User using the `authorized_keys` field
25802586
2581-
- Using one of your other Linode's backups
2582-
- The Linode will be `running` after it completes `provisioning`
2583-
- The disks and config will match that of the Linode that was backed up
2584-
- The `root_pass` will match that of the Linode that was backed up
2587+
* Using one of your other Linode's backups
2588+
* The Linode will be `running` after it completes `provisioning`
2589+
* The disks and config will match that of the Linode that was backed up
2590+
* The `root_pass` will match that of the Linode that was backed up
25852591
2586-
- Create an empty Linode
2587-
- The Linode will remain `offline` and must be manually started
2588-
- see [POST /linode/instances/{linodeId}/boot](/#operation/bootLinodeInstance)
2589-
- Disks and Configs must be created manually
2590-
- This is only recommended for advanced use-cases
2592+
* Create an empty Linode
2593+
* The Linode will remain `offline` and must be manually started
2594+
* See [POST /linode/instances/{linodeId}/boot](/#operation/bootLinodeInstance)
2595+
* Disks and Configs must be created manually
2596+
* This is only recommended for advanced use-cases
25912597
tags:
25922598
- Linode Instances
25932599
operationId: createLinodeInstance
@@ -4954,10 +4960,10 @@ paths:
49544960
x-code-samples:
49554961
- lang: Shell
49564962
source: >
4957-
curl https://api.linode.com/v4/linode/stackscripts/1337
4963+
curl https://api.linode.com/v4/linode/stackscripts/10079
49584964
- lang: CLI
49594965
source: >
4960-
linode-cli stackscripts view 1337
4966+
linode-cli stackscripts view 10079
49614967
put:
49624968
x-linode-grant: read_write
49634969
tags:
@@ -5003,10 +5009,10 @@ paths:
50035009
"rev_note": "Set up MySQL",
50045010
"script": "#!/bin/bash"
50055011
}' \
5006-
https://api.linode.com/v4/linode/stackscripts/1337
5012+
https://api.linode.com/v4/linode/stackscripts/10079
50075013
- lang: CLI
50085014
source: >
5009-
linode-cli stackscripts update 1337 --label a-stackscript --description "This StackScript install and configures MySQL" --images "linode/debian9" --images "linode/debian8" --is_public true --rev_note "Set up MySQL" --script '#!/bin/bash'
5015+
linode-cli stackscripts update 10079 --label a-stackscript --description "This StackScript install and configures MySQL" --images "linode/debian9" --images "linode/debian8" --is_public true --rev_note "Set up MySQL" --script '#!/bin/bash'
50105016
delete:
50115017
x-linode-grant: read_write
50125018
tags:
@@ -5035,10 +5041,10 @@ paths:
50355041
source: >
50365042
curl -H "Authorization: Bearer $TOKEN" \
50375043
-X DELETE \
5038-
https://api.linode.com/v4/linode/stackscripts/1337
5044+
https://api.linode.com/v4/linode/stackscripts/10079
50395045
- lang: CLI
50405046
source: >
5041-
linode-cli stackscripts delete 1337
5047+
linode-cli stackscripts delete 10079
50425048
/linode/types:
50435049
x-linode-cli-command: linodes
50445050
get:
@@ -5108,8 +5114,7 @@ paths:
51085114
x-code-samples:
51095115
- lang: Shell
51105116
source: >
5111-
curl -H "Authorization: Bearer $TOKEN" \
5112-
https://api.linode.com/v4/linode/types/g5-standard-2
5117+
curl https://api.linode.com/v4/linode/types/g5-standard-2
51135118
- lang: CLI
51145119
source: >
51155120
linode-cli linodes type-view g5-standard-2
@@ -8587,7 +8592,11 @@ paths:
85878592
example: null
85888593
config_id:
85898594
type: integer
8590-
description: The ID of the Config used for the Volume.
8595+
description: >
8596+
When creating a volume attached to a Linode, the ID of the
8597+
Linode Config to include the new Volume in. This Config
8598+
must belong to the Linode referenced by linode_id. Must
8599+
not be provided if linode_id is not sent.
85918600
example: 23456
85928601
responses:
85938602
'200':
@@ -8607,14 +8616,12 @@ paths:
86078616
-X POST -d '{
86088617
"label": "my-volume",
86098618
"size": 20,
8610-
"region": "us-east",
8611-
"linode_id": 12346,
8612-
"config_id": 23456
8619+
"linode_id": 12346
86138620
}' \
86148621
https://api.linode.com/v4/volumes
86158622
- lang: CLI
86168623
source: >
8617-
linode-cli volumes create --label my-volume --size 20 --region us-east --linode_id 12346 --config_id 23456
8624+
linode-cli volumes create --label my-volume --size 20 --linode_id 12346 --no-defaults
86188625
/volumes/{volumeId}:
86198626
parameters:
86208627
- name: volumeId
@@ -8801,7 +8808,10 @@ paths:
88018808
readOnly: false
88028809
config_id:
88038810
type: integer
8804-
description: The ID of the Config used for the Volume.
8811+
description: >
8812+
The ID of the Linode Config to include this volume in. Must
8813+
belong to the Linode referenced by `linode_id`. If not given,
8814+
the last booted Config will be chosen.
88058815
example: 23456
88068816
responses:
88078817
'200':
@@ -9620,7 +9630,7 @@ components:
96209630
You may only deploy from a StackScript that you own or that is listed as
96219631
`public`.
96229632
9623-
This field cannot be used when deploying from a backup or a User made image.
9633+
This field cannot be used when deploying from a backup or a private image.
96249634
stackscript_data:
96259635
type: object
96269636
title: Optional User-defined field data for this StackScript.
@@ -11807,7 +11817,7 @@ components:
1180711817
minLength: 0
1180811818
maxLength: 32
1180911819
description: >
11810-
The User Linode's special forces should use when accessing this
11820+
The user Linode's special forces should use when accessing this
1181111821
Linode to respond to an issue.
1181211822
example: linode
1181311823
ip:
@@ -12829,7 +12839,7 @@ components:
1282912839
id:
1283012840
type: integer
1283112841
description: The unique ID of this StackScript.
12832-
example: 1337
12842+
example: 10079
1283312843
readOnly: true
1283412844
x-linode-cli-display: 1
1283512845
username:
@@ -13225,7 +13235,7 @@ components:
1322513235
minLength: 3
1322613236
maxLength: 32
1322713237
description: >
13228-
this User's username. This is used for logging in, and may also be
13238+
This User's username. This is used for logging in, and may also be
1322913239
displayed alongside actions the User performs (for example, in Events
1323013240
or public StackScripts).
1323113241
x-linode-filterable: true

0 commit comments

Comments
 (0)