-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.http
65 lines (48 loc) · 1.13 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
### Run ping
GET http://127.0.0.1:9556/api/healthcheck
> {%
client.test("Response has body", () => {
client.assert(response.status === 200)
client.assert(response.body.status === "OK")
})
%}
### Get person
GET http://127.0.0.1:9556/person/ruslan
### Get index.html
GET http://127.0.0.1:9556
### Head index.html
HEAD http://127.0.0.1:9556
### Insert new entity
POST http://127.0.0.1:9556/api/entity
Content-Type: application/json
{
"title": "New entity",
"text": "New entity text",
"date": "2021-01-01",
"readStatus": false
}
### Get latest entities
GET http://127.0.0.1:9556/api/entity
### Update new entity
PUT http://127.0.0.1:9556/api/entity
Content-Type: application/json
{
"id": 2
}
### Insert new entity
POST http://127.0.0.1:9556/api/mongo/entity
Content-Type: application/json
{
"title": "New entity",
"text": "New entity text",
"date": "2021-01-01",
"readStatus": false
}
### Get latest entities
GET http://127.0.0.1:9556/api/mongo/entity
### Update new entity
PUT http://127.0.0.1:9556/api/mongo/entity
Content-Type: application/json
{
"id": "66a34c9bb2c34e1fab6e6077"
}