-
Notifications
You must be signed in to change notification settings - Fork 0
/
api-docs.http
65 lines (49 loc) · 1.4 KB
/
api-docs.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
# API Documentation
# =================
# Use with the "REST Client" VSCode extension (humao.rest-client).
@apiUrl = http://localhost:3000
@email = [email protected]
@password = 1234
################################################
# Auth
################################################
// @name login
POST {{apiUrl}}/auth/login
Content-Type: application/json
{
"identifier": "{{email}}",
"password": "{{password}}"
}
################################################
// @name refreshToken
POST {{apiUrl}}/auth/refresh_token
Authorization: Basic {{login.response.body.$.accessToken}}
Content-Type: application/json
{
"refreshToken": "{{login.response.body.$.refreshToken}}"
}
################################################
# Users
################################################
// @name createUser
POST {{apiUrl}}/users
Content-Type: application/json
{
"email": "[email protected]",
"password": "1234",
"displayName": "User 1"
}
################################################
// @name updateUser
PUT {{apiUrl}}/users/1
Content-Type: application/json
{
"email": "[email protected]",
"password": "1234",
"displayName": "User 1"
}
################################################
// @name getCurrentUser
GET {{apiUrl}}/users/me
Authorization: Bearer {{login.response.body.$.accessToken}}
################################################