-
Notifications
You must be signed in to change notification settings - Fork 0
/
rest.http
55 lines (47 loc) · 1.05 KB
/
rest.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
### Create a Task
POST http://localhost:8000/tasks/
Content-Type: application/json
{
"title": "Task 1 Title",
"description": "Task 1 Description",
"deadline": "10/08/2022",
"notes": [
{
"title": "Note 1 Title",
"body": "Note 1 Body"
},
{
"title": "Note 2 Title",
"body": "Note 2 Body"
}
]
}
### Get Tasks
GET http://localhost:8000/tasks
### Get Completed Tasks
GET http://localhost:8000/tasks?completed=true
### Get Incomplete Tasks
GET http://localhost:8000/tasks?completed=false
### Get a Task
GET http://localhost:8000/tasks/:taskId/
### Update a Task
PATCH http://localhost:8000/tasks/:taskId/
Content-Type: application/json
{
"title": "Task 1 Title updated",
"description": "Task 1 Description updated",
"deadline": "10/08/2022",
"notes": [
{
"title": "Note 1 Title updated",
"body": "Note 1 Body updated"
},
{
"title": "Note 2 Title updated",
"body": "Note 2 Body updated"
}
],
"completed": true
}
### Delete a Task
DELETE http://localhost:8000/tasks/:taskId/