-
Notifications
You must be signed in to change notification settings - Fork 12
/
apiary.apib
118 lines (69 loc) · 2.29 KB
/
apiary.apib
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
FORMAT: 1A
HOST: https://62xhj71jke.execute-api.ap-southeast-2.amazonaws.com/prod
# Serverless-node-dynamodb-api
A simple API powered by Serverless, Node.js and DynamoDB, intended as a starting point for Serverless APIs.
# Group Items
Operations to retrieve/update Items.
## Items [/items]
### Get all Items [GET]
+ Request
+ Headers
Authorization: Bearer JWT
+ Response 200 (application/json; charset=utf-8)
+ Attributes
+ items (array[Item])
+ Response 401 (application/json; charset=utf-8)
+ Attributes (UnauthorizedResponse)
### Get a single Item [GET /items/{id}]
+ Parameters
+ id: `a34839f1-4896-4770-99fc-b9c8c2add08d` (string, required)
+ Request
+ Headers
Authorization: Bearer JWT
+ Response 200 (application/json; charset=utf-8)
+ Attributes (Item)
+ Response 401 (application/json; charset=utf-8)
+ Attributes (UnauthorizedResponse)
### Create an Item [POST]
+ Request (application/json; charset=utf-8)
+ Headers
Authorization: Bearer JWT
+ Body
{
"name" : "James Bond"
}
+ Response 201 (application/json; charset=utf-8)
+ Attributes (Item)
+ Response 401 (application/json; charset=utf-8)
+ Attributes (UnauthorizedResponse)
### Edit an Item [PATCH /items/{id}]
+ Parameters
+ id: `a34839f1-4896-4770-99fc-b9c8c2add08d` (string, required)
+ Request (application/json; charset=utf-8)
+ Headers
Authorization: Bearer JWT
+ Body
{
"name" : "Jim Bond"
}
+ Response 200
+ Response 401 (application/json; charset=utf-8)
+ Attributes (UnauthorizedResponse)
### Delete an Item [DELETE /items/{id}]
+ Parameters
+ id: `a34839f1-4896-4770-99fc-b9c8c2add08d` (string, required)
+ Request
+ Headers
Authorization: Bearer JWT
+ Response 200
+ Response 401 (application/json; charset=utf-8)
+ Attributes (UnauthorizedResponse)
## Data Structures
### Item (object)
+ id: `a34839f1-4896-4770-99fc-b9c8c2add08d` (string, required)
+ name: James Bond (string, required)
+ createdUtc: `2016-10-17T00:00:00.000Z` (string, required)
### UnauthorizedResponse (object)
+ statusCode: 401 (number, required)
+ error: Unauthorized (string, required)
+ message: Unauthorized (string, required)