-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest-api.http
226 lines (199 loc) · 5.01 KB
/
test-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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
###-------------------------------------------------------SYSTEM------------------------------------------------
###
GET http://{{host}}/metrics
Content-Type: application/json
###
GET http://{{host}}/health/liveness
Content-Type: application/json
###
GET http://{{host}}/health/readiness
Content-Type: application/json
###---------------------------------------------------------JOB-------------------------------------------------
GET http://{{host}}/job/status
Content-Type: application/json
###-------------------------------------------------------ALBUMS------------------------------------------------
###
GET http://{{host}}/v1/tracks
Content-Type: application/json
###
GET http://{{host}}/v1/
tracks
?page=1
&page_size=10
Content-Type: application/json
###
GET http://{{host}}/v1/
tracks
?page=1
&page_size=10
&sort_by=_id
&sort_order=desc
Content-Type: application/json
###
### Postgresql LIKE filters (use _, %, \% )
GET http://{{host}}/v1/
tracks
?page=1
&page_size=10
&sort_by=_id
&sort_order=asc
&filter=DJ RATEK
###
GET http://{{host}}/v1/
tracks
?page=1
&page_size=10
&sort_by=_id
&sort_order=asc
&filter=VA
Content-Type: application/json
###
GET http://{{host}}/v1
/tracks
/d23c2540-fba5-4e14-b636-20500ddec4db
Content-Type: application/json
###--------------------------------------------------------USERS------------------------------------------------
POST http://{{host}}/v1/users/register
Content-Type: application/json
{
"email":"[email protected]",
"name":"a",
"password":"1",
"role":"member"
}
###
POST http://{{host}}/v1/users/login
Content-Type: application/json
{
"email":"[email protected]",
"password":"1"
}
###
POST http://{{host}}/v1/users/login
Content-Type: application/json
{
"email":"[email protected]",
"password":"admin"
}
###
POST http://{{host}}/v1/users/logout
Content-Type: application/json
###
GET http://{{host}}/v1/users/me
Content-Type: application/json
###
POST http://{{host}}/v1/users/delete
Content-Type: application/json
{
"email":"[email protected]"
}
###
POST http://{{host}}/v1/users/refresh
Content-Type: application/json
{
"refresh_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2OTYzMzA0NTksInN1YiI6ImFAYS5jb20ifQ.5wejb-XaOpUvMPDP-JZRQET-HBcpJ5hDQVNN5A3A7y4"
}
###-------------------------------------------------------OTP------------------------------------------------
POST http://{{host}}/v1/users/otp/generate
Content-Type: application/json
{
"user_id":"cac22f72-1fa2-4a81-876d-39fcf1cc9159"
}
###
POST http://{{host}}/v1/users/otp/verify
Content-Type: application/json
{
"user_id":"cac22f72-1fa2-4a81-876d-39fcf1cc9159",
"token": "946767"
}
###
POST http://{{host}}/v1/users/otp/validate
Content-Type: application/json
{
"user_id":"cac22f72-1fa2-4a81-876d-39fcf1cc9159",
"token": "946767"
}
###
POST http://{{host}}/v1/users/otp/disable
Content-Type: application/json
{
"user_id":"cac22f72-1fa2-4a81-876d-39fcf1cc9159"
}
###-------------------------------------------------------PLAY LIST--------------------------------------------
### CreatePlaylist
POST http://{{host}}/v1/playlist/create
Content-Type: application/json
{
"title":"test Play list",
"description":"test Play list"
}
### ListAllPlaylist
GET http://{{host}}/v1
/playlist
/get
### AddToPlaylist
POST http://{{host}}/v1
/playlist
/6ec68de6-4114-49e9-9f85-50c1625e3af3
/bda7a5d0-2641-453b-a183-3adb71c4d573
Content-Type: application/json
### DeletePlaylist
DELETE http://{{host}}/v1
/playlist
/56f9da20-6213-4505-b089-bf4109185b30
Content-Type: application/json
### DeleteTrackFromPlaylist
DELETE http://{{host}}/v1
/playlist
/6ec68de6-4114-49e9-9f85-50c1625e3af3
/5ac0e5a1-5354-4921-ba32-2faf9c658edd
Content-Type: application/json
### ClearPlaylist
DELETE http://{{host}}/v1
/playlist
/85df89a3-73e5-4184-bc62-ef82189f8b61
/clear
Content-Type: application/json
### ListPlaylist
GET http://{{host}}/v1
/playlist
/6ec68de6-4114-49e9-9f85-50c1625e3af3
### AddSingleTrackToPlaylist
POST http://{{host}}/v1
/playlist
/6ec68de6-4114-49e9-9f85-50c1625e3af3/tracks
Content-Type: application/json
{
"item_ids": ["20b502af-8f95-4576-9951-51c81062b52a"]
}
### AddMultipleTrackToPlaylist
POST http://{{host}}/v1
/playlist
/6ec68de6-4114-49e9-9f85-50c1625e3af3/tracks
Content-Type: application/json
{
"item_ids":
[
"023c9db1-5248-442d-b561-b63c950a5970",
"4746eb63-00e9-41ba-90c7-ab17fb9986a3",
"90b4326b-18eb-42a1-aaa7-4cf15a211aaf"
]
}
### AddMultipleWithPositionToPlaylist
POST http://{{host}}/v1
/playlist
/6ec68de6-4114-49e9-9f85-50c1625e3af3/tracks
Content-Type: application/json
{
"item_ids":
[
"023c9db1-5248-442d-b561-b63c950a5970",
"4746eb63-00e9-41ba-90c7-ab17fb9986a3",
"90b4326b-18eb-42a1-aaa7-4cf15a211aaf"
],
"position": 5
}
###-------------------------------------------------------PLAYER--------------------------------------------
### Play playlist
GET http://{{host}}/v1/audio/52ca215e-43b2-4982-94ee-34179ea19cfe
Content-Type: application/json