-
Notifications
You must be signed in to change notification settings - Fork 0
/
Spec
59 lines (50 loc) · 929 Bytes
/
Spec
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
POST /api/notes
Request:
{
"noteText" : "text"
}
Response:
{
"id":"noteId",
"createdDate": "currentTime"
}
Status : 201 (Note Created)
***************************************************
PATCH /api/notes/{id}
Request:
{
"noteText" : "text"
}
Response:
{
"id":"noteId",
"updatedDate": "currentTime"
}
Status : 200 (Note Updated)
***************************************************
GET /api/notes
Sample response body :
[
{"id": "noteId",
"noteText" : "text",
"createdDate": "currentTime",
"updatedDate": "currentTime"
},
{"id": "noteId",
"noteText" : "text",
"createdDate": "currentTime",
"updatedDate": "currentTime"}
]
Status: 200
***************************************************
GET /api/notes/{id}
Response:
{
"noteText" : "text",
"createdDate": "currentTime",
"updatedDate": "currentTime"
}
Status: 200, 404
***************************************************
delete /api/notes/{id}
Status :204 deleted