Skip to content

Commit b8fd231

Browse files
authored
Merge pull request #2687 from SzySteve/docs/post_put_delete
Docs/post put delete
2 parents 792d811 + fefd7e3 commit b8fd231

File tree

7 files changed

+46
-11
lines changed

7 files changed

+46
-11
lines changed

docs/src/data/endpoints/account.yaml

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ endpoints:
9797
-H "Authorization: Bearer $TOKEN" \
9898
-X POST -d '{
9999
"label": "Example app",
100-
"redirect_uri": "https://oauthreturn.example.org/",
100+
"redirect_uri": "https://example.org/oauth_callback/",
101101
}' \
102102
https://$api_root/$version/account/oauth-clients
103103
python: |
104-
new_client = client.account.create_oauth_client('Example app', 'https://oauthreturn.example.org/')
104+
new_client = client.account.create_oauth_client('Example app', 'https://example.org/oauth_callback/')
105105
/account/oauth-clients/$id:
106106
group: OAuth Clients
107107
type: resource
@@ -231,16 +231,20 @@ endpoints:
231231
username:
232232
type: String
233233
description: The username for the new user.
234+
value: example_user
234235
email:
235236
type: String
236237
description: The user's email.
238+
237239
password:
238240
type: String
239241
description: The user's password.
242+
value: hunter2
240243
restricted:
241-
optinoal: true
244+
optional: true
242245
type: Boolean
243246
description: If false, this user has access to the entire account. Defaults to true.
247+
value: true
244248
examples:
245249
curl: |
246250
curl -H "Content-Type: application/json" \
@@ -374,27 +378,30 @@ endpoints:
374378
description: >
375379
Registers a new OAuth client application.
376380
params:
377-
name:
381+
label:
378382
description: A name for the new client application.
379383
type: string
380384
limit: "1-128 characters"
385+
value: Example OAuth app
381386
redirect_uri:
382387
description: A URL to redirect to after the OAuth flow has completed.
383388
type: string
384389
limit: "1-512 characters"
390+
value: https://example.org/oauth_callback/
385391
public:
386392
optional: true
387393
description: >
388394
If true, this client uses the implicit OAuth flow and does not
389395
use a client secret.
390396
type: Boolean
397+
value: true
391398
examples:
392399
curl: |
393400
curl -H "Content-Type: application/json" \
394401
-H "Authorization: Bearer $TOKEN" \
395402
-X POST -d '{
396403
"name": "Example app",
397-
"redirect_uri": "https://oauthreturn.example.org/",
404+
"redirect_uri": "https://example.org/oauth_callback/",
398405
}' \
399406
https://$api_root/$version/account/oauth-clients
400407
/account/oauth-clients/$id:
@@ -491,6 +498,7 @@ endpoints:
491498
group: Events
492499
type: resource
493500
authenticated: true
501+
description: Updates marks all Events up to and including this Event as seen.
494502
methods:
495503
POST:
496504
description: >
@@ -504,6 +512,7 @@ endpoints:
504512
group: Events
505513
type: resource
506514
authenticated: true
515+
description: Updates specific Event to designate that it has been read.
507516
methods:
508517
POST:
509518
description: >
@@ -571,15 +580,24 @@ endpoints:
571580
curl https://$api_root/$version/account/payments
572581
POST:
573582
oauth: account:modify
574-
response: payment
575583
description: >
576584
Make a payment.
585+
params:
586+
usd:
587+
type: String
588+
description: The amount (in US Dollars) of the payment.
589+
value: "120.00"
590+
cvv:
591+
type: String
592+
optional: true
593+
description: CVV (Card Verification Value) of the credit card to be used for the payment.
594+
value: "0123"
577595
examples:
578596
curl: |
579597
curl -H "Content-Type: application/json" \
580598
-H "Authorization: Bearer $TOKEN" \
581599
-X POST -d '{
582-
"usd": 100,
600+
"usd": "120.00",
583601
}' \
584602
https://$api_root/$version/account/payments
585603
/account/payments/:id:

docs/src/data/endpoints/domains.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ endpoints:
4141
description: >
4242
Start of Authority (SOA) contact email.
4343
type: String
44+
optional: true
4445
description:
4546
optional: true
4647
description: >
@@ -115,6 +116,8 @@ endpoints:
115116
import linode
116117
TODO
117118
/domains/$id:
119+
description: >
120+
Manage a particular Domain your account may access.
118121
authenticated: true
119122
methods:
120123
GET:
@@ -257,6 +260,8 @@ endpoints:
257260
TODO
258261
/domains/$id/records/$id:
259262
authenticated: true
263+
description: >
264+
Manage a particular Domain Record your account may access.
260265
methods:
261266
GET:
262267
response: domainrecord

docs/src/data/endpoints/networking.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,11 @@ endpoints:
155155
address:
156156
type: string
157157
value: 210.111.22.94
158+
description: IPv4 address to assign to a Linode.
158159
linode_id:
159160
type: integer
160161
value: 123405
162+
description: The ID of the Linode to assign this address to.
161163
examples:
162164
curl: |
163165
curl -H "Content-Type: application/json" \

docs/src/data/endpoints/nodebalancers.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,11 @@ endpoints:
125125
description: >
126126
Creates a NodeBalancer config.
127127
params:
128-
label:
129-
description: Unique label for your NodeBalancer config.
130-
type: String
131128
port:
132129
description: Port to bind to on the public interfaces.
133130
limit: 1-65534
134131
type: Integer
132+
optional: true
135133
protocol:
136134
description: The protocol used for the config.
137135
type: String

docs/src/data/endpoints/profile.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,14 +266,18 @@ endpoints:
266266
type: String
267267
description: >
268268
The address, either v4 or v6, to allow logins from.
269+
value: 123.45.67.89
269270
netmask:
270271
type: String
271272
description: >
272273
If adding a v4 address, the netmask in the form of "255.255.255.0".
273274
If adding a v6 address, the prefix length ('/64') as an integer.
275+
value: 255.255.255.0
274276
note:
277+
optional: true
275278
type: String
276279
description: A note to add alongside this entry.
280+
value: home
277281
examples:
278282
curl: |
279283
curl -H "Authorization: Bearer $TOKEN" \

docs/src/data/endpoints/support.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@ endpoints:
3030
description: >
3131
A short summary or title for the support ticket.
3232
type: String
33+
value: A question about a Linode
3334
description:
3435
description: >
3536
The complete details of the support request.
3637
type: String
38+
value: More details about the question
3739
domain_id:
3840
description: >
3941
The Domain this ticket is regarding, if relevant.
@@ -44,6 +46,7 @@ endpoints:
4446
The Linode this ticket is regarding, if relevant.
4547
type: Integer
4648
optional: true
49+
value: 123
4750
longviewclient_id:
4851
description: >
4952
The LongviewClient this ticket is regarding, if relevant.
@@ -54,6 +57,11 @@ endpoints:
5457
The NodeBalancer this ticket is regarding, if relevant.
5558
type: Integer
5659
optional: true
60+
volume_id:
61+
description: >
62+
The Block Storage Volume this ticket is regarding, if relevant.
63+
type: Integer
64+
optional: true
5765
examples:
5866
curl: |
5967
curl -H "Content-Type: application/json" \

docs/src/data/objects/oauthclient.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ schema:
1919
description: The app's client secret, used in the OAuth flow. Visible only on app creation.
2020
redirect_uri:
2121
type: String
22-
value: https://oauthreturn.example.org/
22+
value: https://example.org/oauth_callback
2323
description: The URL to redirect to after the OAuth flow.
2424
limit: 1-512 characters
2525
editable: true

0 commit comments

Comments
 (0)