Skip to content

Commit 3ac8b03

Browse files
authored
Merge pull request #2644 from RobertDeRose/feature/image-endpoints
Added initial set of Image endpoint Docs
2 parents 936e340 + 6d0c651 commit 3ac8b03

File tree

3 files changed

+124
-0
lines changed

3 files changed

+124
-0
lines changed

docs/prebuild.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,12 @@ const endpointMap = {
359359
routePath: `${ROUTE_BASE_PATH}/profile`,
360360
groups: {},
361361
},
362+
images: {
363+
name: 'Images',
364+
path: '/images',
365+
routePath: `${ROUTE_BASE_PATH}/images`,
366+
groups: {},
367+
},
362368
};
363369

364370
allEndpoints.forEach(function (endpointContainer) {

docs/src/data/endpoints/images.yaml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Images
2+
description: >
3+
Image endpoints provide a means of managing the images associated with a
4+
user's account.
5+
endpoints:
6+
/images:
7+
authenticated: true
8+
description: |
9+
Image collection endpoints
10+
methods:
11+
GET:
12+
response: image
13+
oauth: 'images:view'
14+
description: |
15+
Returns a list of images.
16+
examples:
17+
curl: |
18+
curl https://$api_root/$version/images
19+
python: |
20+
import linode
21+
TODO
22+
/images/$id:
23+
type: resource
24+
description: |
25+
Image manipulation endpoints
26+
methods:
27+
GET:
28+
oauth: 'images:view'
29+
response: image
30+
description: |
31+
Returns a specific image resource
32+
examples:
33+
curl: |
34+
curl https://$api_root/$version/images/$image_id
35+
python: |
36+
import linode
37+
TODO
38+
PUT:
39+
oauth: 'images:modify'
40+
description: |
41+
Modifies a given image
42+
examples:
43+
curl: |
44+
curl -H "Content-Type: application/json" \
45+
-H "Authorization: Bearer TOKEN" \
46+
-X PUT -d '{
47+
"label": "a_new_label",
48+
"description": "A new description"
49+
}'
50+
https://$api_root/$version/images/$image_id
51+
python: |
52+
import linode
53+
TODO
54+
DELETE:
55+
oauth: 'images:delete'
56+
description: |
57+
Deletes a given image
58+
examples:
59+
curl: |
60+
curl -H "Authorization: Bearer $TOKEN" \
61+
-X DELETE
62+
https://$api_root/$version/images/$image_id
63+
python: |
64+
import linode
65+
TODO

docs/src/data/objects/image.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Image
2+
description: >
3+
Image objects describe an image that was made based off a device on a Linode
4+
schema:
5+
id:
6+
type: Integer
7+
value: 12345
8+
description: The ID of this image
9+
label:
10+
type: String
11+
value: ubuntu_17.4_with_rails_5
12+
description: |
13+
A short description of the image with a max of 200 characters. Labels
14+
cannot contain special characters.
15+
filterable: true
16+
editable: true
17+
description:
18+
type: String
19+
value: Ubuntu 17.4 with Ruby on Rails 5
20+
description: |
21+
A detailed description of this image with a max of 65000 characters.
22+
editable: true
23+
status:
24+
type: Enum
25+
subtype: Status
26+
value: available
27+
description: The status of the image.
28+
filesystem:
29+
type: String
30+
value: ext4
31+
description: The filesystem type of the image.
32+
created:
33+
type: string
34+
value: "2015-09-29T11:21:01"
35+
description: When the image was created.
36+
updated:
37+
type: string
38+
value: "2015-09-29T11:21:01"
39+
description: The last time the image was modified.
40+
type:
41+
type: Enum
42+
subtype: Type
43+
value: automatic
44+
description: How the image was created.
45+
is_public:
46+
type: Boolean
47+
value: true
48+
filterable: true
49+
description: True if the image is public.
50+
last_used:
51+
type: string
52+
value: "2015-09-29T11:21:01"
53+
description: The last time this image was used.

0 commit comments

Comments
 (0)