-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapi.http
123 lines (84 loc) · 2.92 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
@host = http://localhost:8080
#@host = https://hdapp.ruslang.xyz
@token = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MzcsImlhdCI6MTY4MTkyNjIwNiwiZXhwIjoxNjgyMDEyNjA2fQ.jT5GD1yS1xj2JBickUpHKLoNcaJZpn5QrnzTwG9Lh84
POST {{host}}/api/auth/login HTTP/1.1
Content-Type: application/json
{
"email": "[email protected]",
"password": "123"
}
###
POST {{host}}/api/auth/register HTTP/1.1
Content-Type: application/json
{
"email": "[email protected]",
"full_name": "cringe cringe",
"birth_date": "2002-01-01",
"medical_organization_name": null,
"confirmation_document_ids": [],
"has_doctor_capabilities": false
}
###
POST {{host}}/api/auth/register HTTP/1.1
Content-Type: application/json
{
"email": "[email protected]",
"full_name": "Anna Cutemon",
"birth_date": "2002-01-01",
"medical_organization_name": "DobroMed",
"confirmation_document_ids": [],
"has_doctor_capabilities": true
}
###
@verifyToken = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6OCwiZW1haWwiOiJydXppa25mKzIzNDU2N0BydXppay54eXoiLCJpYXQiOjE2Nzk2NTYwMzV9.sCJeVxXZUWqU5t-PvlKilVb0sKmk8Hh5n-NkRCC15MQ
GET {{host}}/api/auth/verify/{{verifyToken}} HTTP/1.1
####
POST {{host}}/api/media/upload HTTP/1.1
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="files"; filename="login.http"
Content-Type: image/png
< ./login.http
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="files"; filename="launch.json"
Content-Type: image/png
< ../launch.json
------WebKitFormBoundary7MA4YWxkTrZu0gW--
####
@file_id = 201228421542887429
@file_name = login.http
GET {{host}}/api/media/download/{{file_id}}/{{file_name}} HTTP/1.1
Authorization: Bearer {{token}}
####
# { has_doctor_capabilities: false }
#@b64Filters = eyJoYXNfZG9jdG9yX2NhcGFiaWxpdGllcyI6ZmFsc2V9
# { has_doctor_capabilities: true }
#@b64Filters = eyJoYXNfZG9jdG9yX2NhcGFiaWxpdGllcyI6dHJ1ZX0=
# { has_web3_address: false, has_doctor_capabilities: true, is_banned: false }
@b64Filters = eyJoYXNfd2ViM19hZGRyZXNzIjpmYWxzZSwiaGFzX2RvY3Rvcl9jYXBhYmlsaXRpZXMiOnRydWUsImlzX2Jhbm5lZCI6ZmFsc2V9
# { has_doctor_capabilities: true, is_banned: false }
#@b64Filters = eyJoYXNfZG9jdG9yX2NhcGFiaWxpdGllcyI6dHJ1ZSwiaXNfYmFubmVkIjpmYWxzZX0=
GET {{host}}/api/users?filters={{b64Filters}} HTTP/1.1
Authorization: Bearer {{token}}
####
GET {{host}}/api/users/by_id/3 HTTP/1.1
Authorization: Bearer {{token}}
####
GET {{host}}/api/users/by_web3_address/0xD6EDeB8cb9362C88F577aa37D9f5Ee27275DC93A HTTP/1.1
Authorization: Bearer {{token}}
####
PATCH {{host}}/api/users/by_id/11 HTTP/1.1
Authorization: Bearer {{token}}
Content-Type: application/json
{
"full_name": "cringe cringe2"
}
####
POST {{host}}/api/users/by_id/3/verify HTTP/1.1
Authorization: Bearer {{token}}
####
GET {{host}}/api/users/current/ HTTP/1.1
Authorization: Bearer {{token}}
####
GET {{host}}/api/statistics/ HTTP/1.1
####