Skip to content

Commit 521df28

Browse files
committed
Merge remote-tracking branch 'oldman/pending-docs-updates' into develop
2 parents f981be8 + 653cbba commit 521df28

File tree

11 files changed

+376
-255
lines changed

11 files changed

+376
-255
lines changed

docs/src/data/endpoints/volumes.yaml

Lines changed: 220 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,220 @@
1+
name: Volumes
2+
description: >
3+
Volume endpoints provide a means of managing the Volume objects on your account.
4+
endpoints:
5+
/volumes:
6+
authenticated: true
7+
description: >
8+
Manage your Block Storage Volumes.
9+
methods:
10+
GET:
11+
response: volume
12+
paginationKey: volumes
13+
oauth: volumes:view
14+
description: >
15+
Returns a list of volumes.
16+
examples:
17+
curl: |
18+
curl -H "Authorization: Bearer $TOKEN" \
19+
https://$api_root/$version/volumes
20+
python: |
21+
volumes = client.linode.get_volumes()
22+
POST:
23+
oauth: volumes:create
24+
description: >
25+
Create a new Block Storage Volume
26+
params:
27+
label:
28+
description: >
29+
A unique label to identify your new volume with.
30+
type: String
31+
value: a_fancy_new_volume
32+
region:
33+
description: >
34+
Which region the new volume should be created in.
35+
type: String
36+
value: us-east-1a
37+
size:
38+
optional: true
39+
description: >
40+
The size in GiBs that you wish to make your new volume.
41+
Defaults to 20 GiB, can be as large as 1024 GiB (1 TiB).
42+
type: Integer
43+
linode_id:
44+
optional: true
45+
description: >
46+
An id to a Linode you'd like this volume to be attached to after
47+
creation. Requires an additional scope of `linode:modify` and you
48+
must have permission to access that given Linode.
49+
type: Integer
50+
config_id:
51+
optional: true
52+
description: >
53+
An id to a Linode configuration profile to used when attaching to
54+
a Linode that has more than one configuration profile.
55+
type: Integer
56+
examples:
57+
curl: |
58+
curl -H "Content-Type: application/json" \
59+
-H "Authorization: token $TOKEN" \
60+
-X POST -d '{
61+
"label": "a_fancy_new_volume",
62+
"region": "us-east-1a",
63+
"size": "100"
64+
}'
65+
https://$api_root/$version/volumes
66+
python: |
67+
import linode
68+
TODO
69+
/volumes/$id:
70+
type: resource
71+
authenticated: true
72+
description: >
73+
Manage an individual Block Storage Volume.
74+
methods:
75+
GET:
76+
response: volume
77+
oauth: volumes:view
78+
description: >
79+
Returns information about this Volume.
80+
examples:
81+
curl: |
82+
curl -H "Authorization: Bearer $TOKEN" \
83+
https://$api_root/$version/volumes/$volume_id
84+
python: |
85+
v = linode.Volume(client, 123)
86+
DELETE:
87+
oauth: volumes:delete
88+
description: >
89+
Removes a volume from your account.
90+
examples:
91+
curl: |
92+
curl -H "Authorization: Bearer $TOKEN" \
93+
-X DELETE \
94+
https://$api_root/$version/volumes/$volume_id
95+
python: |
96+
v = linode.Volume(client, 123)
97+
v.delete()
98+
POST:
99+
oauth: volumes:create
100+
description: >
101+
Create a new Block Storage Volume
102+
params:
103+
label:
104+
description: >
105+
A unique label to identify your new volume with.
106+
type: String
107+
value: a_fancy_new_volume
108+
region:
109+
description: >
110+
Which region the new volume should be created in.
111+
type: String
112+
value: us-east-1a
113+
size:
114+
optional: true
115+
description: >
116+
The size in GiBs that you wish to make your new volume.
117+
Defaults to 20 GiB, can be as large as 1024 GiB (1 TiB).
118+
type: Integer
119+
linode_id:
120+
optional: true
121+
description: >
122+
An id to a Linode you'd like this volume to be attached to after
123+
creation. Requires an additional scope of `linode:modify` and you
124+
must have permission to access that given Linode.
125+
type: Integer
126+
config_id:
127+
optional: true
128+
description: >
129+
An id to a Linode configuration profile to used when attaching to
130+
a Linode that has more than one configuration profile.
131+
type: Integer
132+
examples:
133+
curl: |
134+
curl -H "Content-Type: application/json" \
135+
-H "Authorization: token $TOKEN" \
136+
-X POST -d '{
137+
"label": "a_fancy_new_volume",
138+
"region": "us-east-1a",
139+
"size": "100"
140+
}'
141+
https://$api_root/$version/volumes
142+
python: |
143+
import linode
144+
TODO
145+
/volumes/$id/clone:
146+
type: resource
147+
authenticated: true
148+
description: >
149+
Clone a Block Storage Volume.
150+
methods:
151+
POST:
152+
oauth: volumes:create
153+
description: >
154+
Clone a volume
155+
params:
156+
label:
157+
description: >
158+
A unique label to identify your new clone volume.
159+
type: String
160+
examples:
161+
curl: |
162+
curl -H "Authorization: Bearer $TOKEN" \
163+
-X POST -d '{
164+
"label": "Clone Label"
165+
}' \
166+
https://$api_root/$version/volumes/$volume_id/clone
167+
python: |
168+
import linode
169+
TODO
170+
/volumes/$id/attach:
171+
authenticated: true
172+
description: >
173+
Attach a Block Storage Volume to a Linode.
174+
methods:
175+
POST:
176+
oauth: volumes:modify
177+
description: >
178+
Attach a Block Storage Volume to a Linode.
179+
params:
180+
linode_id:
181+
description: >
182+
An id to a Linode you'd like this volume to be attached to.
183+
Requires an additional scope of `linode:modify` and you
184+
must have permission to access that given Linode.
185+
type: Integer
186+
config_id:
187+
optional: true
188+
description: >
189+
An id to a Linode configuration profile to used when attaching to
190+
a Linode that has more than one configuration profile.
191+
type: Integer
192+
examples:
193+
curl: |
194+
curl -H "Content-Type: application/json" \
195+
-H "Authorization: token $TOKEN" \
196+
-X POST -d '{
197+
"linode_id": 1234
198+
}'
199+
https://$api_root/$version/volumes/$volume_id/attach
200+
python: |
201+
import linode
202+
TODO
203+
/volumes/$id/detach:
204+
type: resource
205+
authenticated: true
206+
description: >
207+
Detach a Block Storage Volume from a Linode.
208+
methods:
209+
POST:
210+
oauth: volumes:modify,linodes:modify
211+
description: >
212+
Detach a Block Storage Volume from a Linode.
213+
examples:
214+
curl: |
215+
curl -H "Authorization: Bearer $TOKEN" \
216+
-X POST \
217+
https://$api_root/$version/volumes/$volume_id/detach
218+
python: |
219+
v = linode.Volume(client, 123)
220+
v.detach()

prebuild.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ function formatSchemaField(schemaField, enumMap, filterDepth, iteration = 1) {
128128
description = convertUlToArray(description);
129129

130130
// eslint-disable-next-line max-len
131-
const { name, seeAlso, editable, filterable, optional, type, subtype, isArray, value } = schemaField;
131+
const { name, seeAlso, editable, filterable, optional, type, subtype, isArray, value, deprecated } = schemaField;
132132
let lowerType = type && _.isString(type) ? type.toLowerCase() : 'object';
133133

134134
let nestedSchema = null;
@@ -188,6 +188,7 @@ function formatSchemaField(schemaField, enumMap, filterDepth, iteration = 1) {
188188
isArray,
189189
type: lowerType,
190190
schema: nestedSchema,
191+
deprecated,
191192
};
192193
}
193194

@@ -381,6 +382,12 @@ const endpointMap = {
381382
routePath: `${ROUTE_BASE_PATH}/images`,
382383
groups: {},
383384
},
385+
volumes: {
386+
name: 'Volumes',
387+
path: '/volumes',
388+
routePath: `${ROUTE_BASE_PATH}/volumes`,
389+
groups: {},
390+
},
384391
};
385392

386393
allEndpoints.forEach(function (endpointContainer) {
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
.FieldCell {
22
&-label {
33
margin-top: -5px;
4+
&-deprecated {
5+
color: red;
6+
}
47
}
58
}
69

src/components/tables/cells/ParamFieldCell.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,26 @@ export default function ParamFieldCell(props) {
2020
);
2121
}
2222

23+
let deprecatedWarning;
24+
if (record.deprecated) {
25+
deprecatedWarning = (
26+
<div className="FieldCell-label-deprecated">
27+
<small>
28+
{record.deprecated}
29+
</small>
30+
</div>
31+
);
32+
}
33+
2334
return (
2435
<td className="TableCell FieldCell">
2536
<div>
2637
{record.name}
2738
</div>
2839
{subLabel}
40+
<div>
41+
{deprecatedWarning}
42+
</div>
2943
</td>
3044
);
3145
}

src/data/endpoints/account.yaml

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,4 +620,56 @@ endpoints:
620620
examples:
621621
curl: |
622622
curl https://$api_root/$version/account/payments/123
623-
623+
/account/payments/paypal:
624+
group: Payments
625+
type: Action
626+
authenticated: true
627+
description: >
628+
Stage a PayPal payment. You must POST to /account/payments/paypal/execute
629+
to actually submit this payment, and only after it has been approved with
630+
PayPal.
631+
methods:
632+
POST:
633+
oauth: account:modify
634+
description: >
635+
Stages a PayPal payment. This returns a PaymentID that must be authorized
636+
in PayPal's system before the payment can be executed.
637+
params:
638+
usd:
639+
type: String
640+
description: The amount (in US Dollars) of the payment.
641+
value: "120.00"
642+
redirect_url:
643+
type: String
644+
description: The URL to have PayPal redirect to when payment is approved.
645+
value: https://example.org
646+
cancel_url:
647+
type: String
648+
description: The URL to have PayPal redirect to when payment is cancelled.
649+
value: https://example.org
650+
/account/payments/paypal/execute:
651+
group: Payments
652+
type: Action
653+
authenticated: True
654+
description: >
655+
Executes a staged and approved PayPal payment.
656+
methods:
657+
POST:
658+
oauth: account:modify
659+
description: >
660+
Given a PaymentID and a PayerID as generated by PayPal during the transaction
661+
authorization process, executes the payment to capture the funds and
662+
credit your Linode account.
663+
params:
664+
payment_id:
665+
type: String
666+
description: >
667+
The PaymentID returned from POST /account/payments/paypal that has
668+
been approved with PayPal.
669+
value: PAY-1234567890ABCDEFGHIJKLMN
670+
payer_id:
671+
type: String
672+
description: >
673+
The PayerID returned by PayPal during the transaction authorization
674+
process.
675+
value: ABCDEFGHIJKLM

src/data/endpoints/domains.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,25 @@ endpoints:
170170
python: |
171171
import linode
172172
TODO
173+
/domains/$id/clone:
174+
authenticated: true
175+
description: >
176+
Clones the provided Domain into a new Domain. You must provide a new
177+
domain for the cloned domain as Domains must be unique.
178+
methods:
179+
POST:
180+
response: domain
181+
oauth: domains:modify
182+
params:
183+
domain:
184+
description: >
185+
The Domain name for the new Domain.
186+
type: String
187+
value: mynewdomain.com
188+
examples:
189+
curl: |
190+
curl -H "Authorization: Bearer $TOKEN" \
191+
https://$api_root/$version/domains/$domain_id/records
173192
/domains/$id/records:
174193
authenticated: true
175194
description: >

src/data/endpoints/images.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ endpoints:
1010
methods:
1111
GET:
1212
response: image
13+
paginationKey: images
1314
oauth: 'images:view'
1415
description: |
1516
Returns a list of images.
@@ -38,7 +39,7 @@ endpoints:
3839
PUT:
3940
oauth: 'images:modify'
4041
description: |
41-
Modifies a given image
42+
Modifies a given image. Only private images belonging to you are modifiable.
4243
examples:
4344
curl: |
4445
curl -H "Content-Type: application/json" \
@@ -54,7 +55,7 @@ endpoints:
5455
DELETE:
5556
oauth: 'images:delete'
5657
description: |
57-
Deletes a given image
58+
Deletes a given image.Only private images belonging to you are deletable.
5859
examples:
5960
curl: |
6061
curl -H "Authorization: Bearer $TOKEN" \

0 commit comments

Comments
 (0)