-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.http
More file actions
54 lines (43 loc) · 1.16 KB
/
Copy pathmain.http
File metadata and controls
54 lines (43 loc) · 1.16 KB
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
### registration
POST http://localhost:8080/registration
Content-Type: application/json
{
"login": "john2",
"password": "password2"
}
### login
POST http://localhost:8080/login
Content-Type: application/json
{
"login": "john2",
"password": "password2"
}
### create item (entity) - all fields in json will be added to 'data' field in entity
POST http://localhost:8080/items/new
Authorization: 4903aa66-daec-4b83-a964-ec6371b2ae7f
Content-Type: application/json
{
"data": {
"any_data": "123john555",
"any_data2": "123john5552"
}
}
### list of items
GET http://localhost:8080/items
Authorization: 4903aa66-daec-4b83-a964-ec6371b2ae7f
### remove item
DELETE http://localhost:8080/items/628b8a716937181e17a11e6a
Authorization: 1def20f2-4003-46f3-bdb3-1c7ebdc4ad25
Content-Type: application/json
### send item
POST http://localhost:8080/send
Authorization: 4903aa66-daec-4b83-a964-ec6371b2ae7f
Content-Type: application/json
{
"new_owner": "john2",
"item_id": "628b8afd6937181e17a11e6e"
}
### receive transfer item
GET http://localhost:8080/get?link_id=628b8b116937181e17a11e6f
Authorization: ff8419ba-bc39-4da0-9218-cbf3c2838f0e
Content-Type: application/json