-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi.http
243 lines (177 loc) · 5.68 KB
/
api.http
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
####################
# === TIMELINES ===
####################
# GET /api/timelines
# list timelines
GET http://localhost:3000/api/timelines?limit=5&page=1 HTTP/1.1
###
# GET /api/timelines/{tid}
# get information about timeline with {tid} id
GET http://localhost:3000/api/timelines/1 HTTP/1.1
###
# POST /api/timelines
# create new timeline
POST http://localhost:3000/api/timelines HTTP/1.1
###
# PUT /api/timelines/{tid}
# update informations about timeline with {tid} id
PUT http://localhost:3000/api/timelines/1 HTTP/1.1
Content-Type: application/json
If-Match: "45-ugJz63KKhs+9JOkfQZSPZn/C2To"
{
"name": "UI sprint #2",
"description": "lorem ipsum",
"startsAt": "2020-06-01T00:00:00.000Z",
"endsAt": "2020-06-14T00:00:00.000Z"
}
###
# PATCH /api/timelines/{tid}
# update informations about timeline with {tid} id
PATCH http://localhost:3000/api/timelines/1 HTTP/1.1
Content-Type: application/json
If-Match: "45-GDIyu3Bp6uckgqbn9BNC2cpBA2I"
{
"name": "UI sprint #3"
}
###
# DELETE /api/timelines/{tid}
# delete timeline with {tid} id
DELETE http://localhost:3000/api/timelines/1 HTTP/1.1
If-Match: "45-GDIyu3Bp6uckgqbn9BNC2cpBA2I"
##############
# === ROWS ===
##############
# GET /api/timelines/{tid}/rows
# list rows informations for timeline with {tid} id
GET http://localhost:3000/api/timelines/1/rows HTTP/1.1
###
# GET /api/timelines/{tid}/rows/{rid}
# create new row for timeline with {tid} id
GET http://localhost:3000/api/timelines/1/rows/1 HTTP/1.1
###
# GET /api/timelines/{tid}/row/{rid}/events
# list events for row with {rid} id
GET http://localhost:3000/api/timelines/1/rows/1/events HTTP/1.1
###
# POST /api/timelines/{tid}/rows
# create new row for timeline with {tid} id
POST http://localhost:3000/api/timelines/1/rows/ HTTP/1.1
###
# PUT /api/timelines/{tid}/rows/{rid}
# update information about row with {rid} id
PUT http://localhost:3000/api/timelines/1/rows/1 HTTP/1.1
Content-Type: application/json
If-Match: "23-X/QKbRlT/jK1gHDAlSrhurywLFo"
{
"name": "Robert",
}
###
# PATCH /api/timelines/{tid}/rows/{rid}
# partially update informations about row with {rid} id
PATCH http://localhost:3000/api/timelines/1/rows/1 HTTP/1.1
Content-Type: application/json
If-Match: "45-GDIyu3Bp6uckgqbn9BNC2cpBA2I"
{
"name": "Trebor"
}
###
# DELETE /api/timelines/{tid}/rows/{rid}
# delete row with {rid} id and events that belong to row
DELETE http://localhost:3000/api/timelines/1/rows/1 HTTP/1.1
If-Match: "45-GDIyu3Bp6uckgqbn9BNC2cpBA2I"
#####################
# === CATEGORIES ===
#####################
# GET /api/timelines/{tid}/categories
# list categories informations for timeline with {cid} id
GET http://localhost:3000/api/timelines/1/categories HTTP/1.1
###
# GET /api/timelines/{tid}/categories/{cid}
# get information about category with {cid} id
GET http://localhost:3000/api/timelines/1/categories/1 HTTP/1.1
###
# GET /api/timelines/{tid}/categories/{cid}/events
# list events for categories with {cid} id
GET http://localhost:3000/api/timelines/1/categories/1/events HTTP/1.1
###
# POST /api/timelines/{tid}/categories
# create new category for timeline with {tid} id
POST http://localhost:3000/api/timelines/1/categories HTTP/1.1
###
# PUT /api/timelines/{tid}/categories/{cid}
# update information about category with {cid} id
PUT http://localhost:3000/api/timelines/1/categories/1 HTTP/1.1
Content-Type: application/json
If-Match: "43-qtD7wix6HBgP2q3nCIkkDPnHJ9c"
{
"name": "File Search",
"description": "lorem ipsum...",
"color": "#d9ead3"
}
###
# PATCH /api/timelines/{tid}/categories/{cid}
# partially update informations about category with {cid} id
PATCH http://localhost:3000/api/timelines/1/categories/1 HTTP/1.1
Content-Type: application/json
If-Match: "45-GDIyu3Bp6uckgqbn9BNC2cpBA2I"
{
"name": "File Search improvements"
}
###
# DELETE /api/timelines/{tid}/categories/{cid}
# delete category with {cid} id and events that belong to category
DELETE http://localhost:3000/api/timelines/1/categories/1 HTTP/1.1
If-Match: "45-GDIyu3Bp6uckgqbn9BNC2cpBA2I"
################
# === EVENTS ===
################
# GET /api/timelines/{tid}/events
# list events for timeline with {tid} id
GET http://localhost:3000/api/timelines/1/events HTTP/1.1
###
# GET /api/timelines/{tid}/events/{eid}
# get information about event with {eid} id
GET http://localhost:3000/api/timelines/1/events/1 HTTP/1.1
###
# POST /api/timelines/{tid}/events
# create new event for timeline with {tid} id
POST http://localhost:3000/api/timelines/1/events HTTP/1.1
###
# PUT /api/timelines/{tid}/events/{eid}
# update information about event with {eid} id
PUT http://localhost:3000/api/timelines/1/events/1 HTTP/1.1
Content-Type: application/json
If-Match: "73-DYiA2RPnRSwEXB98c1SqFjW4LpQ"
{
"name": "File Search API",
"description": "lorem ipsum...",
"startsAt": "2020-06-02T00:00:00.000Z",
"endsAt": "2020-06-04T00:00:00.000Z",
"categoryId": 1,
"rowId": 1
}
###
# PATCH /api/timelines/{tid}/events/{eid}
# partially update informations about event with {eid} id
PATCH http://localhost:3000/api/timelines/1/events/1 HTTP/1.1
Content-Type: application/json
If-Match: "45-GDIyu3Bp6uckgqbn9BNC2cpBA2I"
{
"name": "File Search feature for Folder Listing View"
}
###
# DELETE /api/timelines/{tid}/events/{eid}
# delete event with {eid} id
DELETE http://localhost:3000/api/timelines/1/events/1 HTTP/1.1
If-Match: "45-GDIyu3Bp6uckgqbn9BNC2cpBA2I"
###########################
# === CATEGORY-TRANSFER ===
###########################
# POST /category-transfers
# transfer category and related events to different timeline (assignments to rows are removed)
POST http://localhost:3000/api/category-transfers HTTP/1.1
Content-Type: application/json
{
"categoryId": 1,
"timelineId": 3
}