blob: aab693a8c2939b1f885386d2d2b30e56a076a05f (
plain) (
blame)
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
|
@baseUrl=http://localhost:3000
@username=admin
@password=admin
@email=admin@example.com
@userType=admin
GET {{baseUrl}}/budget/:id/add HTTP/1.1
###
# Get all users (raw)
GET {{baseUrl}}/admin/users HTTP/1.1
Authorization: Bearer {{accessToken}}
###
# Get a user (raw)
GET {{baseUrl}}/admin/user/:id HTTP/1.1
Authorization: Bearer {{accessToken}}
###
DELETE {{baseUrl}}/admin/user/:id HTTP/1.1
###
GET {{baseUrl}}/alarm/:id HTTP/1.1
###
PUT {{baseUrl}}/alarm/:id HTTP/1.1
###
GET {{baseUrl}}/alarms HTTP/1.1
###
GET {{baseUrl}}/alarm/@me HTTP/1.1
###
PUT {{baseUrl}}/alarm/@me HTTP/1.1
###
DELETE {{baseUrl}}/alarm/@me HTTP/1.1
###
# Delete account
DELETE {{baseUrl}}/auth/delete HTTP/1.1
Content-Type: application/json
{
"username": "{{username}}",
"email": "{{email}}",
"password": "{{email}}"
}
###
GET {{baseUrl}}/budget/:id HTTP/1.1
###
GET {{baseUrl}}/budget/@me HTTP/1.1
###
GET {{baseUrl}}/auth/devices HTTP/1.1
###
# Get the index page (empty)
GET {{baseUrl}}/ HTTP/1.1
###
# Log in as a user
POST {{baseUrl}}/auth/login HTTP/1.1
Content-Type: application/json
{
"username": "{{username}}",
"email": "{{email}}",
"password": "{{email}}"
}
###
# Log out from a device (TODO)
POST {{baseUrl}}/auth/logout HTTP/1.1
Authorization: Bearer {{accessToken}}
###
# Create a new user
POST {{baseUrl}}/auth/register HTTP/1.1
Content-Type: application/json
{
"username": "{{username}}",
"email": "{{email}}",
"password": "{{email}}",
"type": "{{userType}}"
}
###
# Get the server status
GET {{baseUrl}}/status HTTP/1.1
###
# Get current user
GET {{baseUrl}}/auth/whoami HTTP/1.1
###
|