-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrest_interface.html
395 lines (393 loc) · 25.4 KB
/
rest_interface.html
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
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>VirtualJukebox: REST interface</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">VirtualJukebox
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.16 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
</div><!-- top -->
<div class="PageDoc"><div class="header">
<div class="headertitle">
<div class="title">REST interface </div> </div>
</div><!--header-->
<div class="contents">
<div class="toc"><h3>Table of Contents</h3>
<ul><li class="level1"><a href="#status_responses">Status response</a></li>
<li class="level1"><a href="#available_requests">Available requests</a><ul><li class="level2"><a href="#generate_session">Generating a session</a></li>
<li class="level2"><a href="#query_tracks">Querying tracks</a></li>
<li class="level2"><a href="#get_current_queues">Get current queues</a></li>
<li class="level2"><a href="#add_track">Add track to queue</a></li>
<li class="level2"><a href="#vote_track">Vote track</a></li>
<li class="level2"><a href="#control_player">Control player</a></li>
<li class="level2"><a href="#move_track">Move tracks between queues</a></li>
<li class="level2"><a href="#remove_track">Remove tracks from queues</a></li>
</ul>
</li>
</ul>
</div>
<div class="textblock"><p>This page describes the available REST endpoints provided for clients and how they can be used. Each of the following requests define a method, a path and JSON format for the request/response body which is expected/can be expected.</p>
<h1><a class="anchor" id="status_responses"></a>
Status response</h1>
<p>Since it cannot be guaranteed that every request can be handled as intended, there needs to be some kind of status report.<br />
Requests which are handled successfully always respond with a HTTP status code of <code>200 OK</code>. Every other code indicates an error.</p>
<p>The known errors are:</p>
<ul>
<li><code>401 Unauthorized</code><br />
If a client requested a new admin session but specified a wrong password.</li>
<li><code>403 Forbidden</code><br />
The request was done by an unauthorized user. That includes requests to admin endpoints by non-admins or an attempt to do multiple votes on the same track. Additionally this error may be returned if the <a class="el" href="classMusicBackend.html" title="Provides an abstracted interface to a MusicBackend s.">MusicBackend</a> has an permission problem.</li>
<li><code>404 Not found</code><br />
The requested endpoint has not been found.<br />
For now, unknown <code>track_id</code>s also trigger this error.</li>
<li><code>422 Unprocessable Entity</code><br />
The content of the request (JSON body) has an unexpected/invalid format.</li>
<li><code>440 Login-Time-out</code><br />
The currently used session is invalid or has expired.</li>
<li><code>500 Internal Server <a class="el" href="classError.html" title="A customized error type.">Error</a></code><br />
This code may be encountered if the server catched an internal error (which may as well just have crashed the server) and was still able to send a response.<br />
If a client gets that status code, please notify the server team!</li>
<li><code>502 Bad Gateway</code><br />
If a third party service responds with any unexpected error this error code is returned.</li>
</ul>
<p><b>Note</b>: More errors may be added in the future!</p>
<p>In case of an error (i.e. HTTP status code is not <code>200</code>) the response body looks like this:</p>
<div class="fragment"><div class="line">{</div>
<div class="line"> <span class="stringliteral">"status"</span>: <status_code>,</div>
<div class="line"> <span class="stringliteral">"error"</span>: <span class="stringliteral">"<error_message>"</span></div>
<div class="line">}</div>
</div><!-- fragment --><p><code>status_code</code> will be the repeated HTTP status code (403 for example).<br />
<code>error</code> contains a short description which can be used to display an error message to the end user.</p>
<h1><a class="anchor" id="available_requests"></a>
Available requests</h1>
<p>This section lists all available REST endpoints and their intended usages. Additionally the needed HTTP method as well as the path and the body layout is specified.</p>
<p>Requests using the <code>GET</code> method should pass their parameters in the <a href="https://en.wikipedia.org/wiki/Query_string">query string</a> instead of the body.</p>
<p>The bodies of other methods and all responses are expected/can be expected in the JSON format. Field values can be of type <code>int</code> (32-bit signed integer), <code>string</code> (quoted with double quotes) or <code>boolean</code> (true or false).</p>
<p><b>Note</b>: Invalid JSON (or missing required fields) will trigger an <code>422</code> error!</p>
<h2><a class="anchor" id="generate_session"></a>
Generating a session</h2>
<p>Before doing other requests clients need to get a session ID. This ID is used to identify the user between multiple requests, which is needed if the user wants to undo a vote or prevents him from voting twice on the same track.</p>
<p><b>Note</b>: When an invalid/expired session ID is used in any request a <code>440</code> error is triggered!</p>
<p><b>Note</b>: If the client drops the session ID on purpose the voting system can be exploited!</p>
<h3><a class="anchor" id="autotoc_md2"></a>
Request</h3>
<ul>
<li>Method: <br />
<code>POST</code></li>
<li>Path: <br />
<code>/api/v1/generateSession</code></li>
<li>Body: <br />
<div class="fragment"><div class="line">{</div>
<div class="line"> <span class="stringliteral">"password"</span>: <span class="stringliteral">"<admin_password>"</span>,</div>
<div class="line"> <span class="stringliteral">"nickname"</span>: <span class="stringliteral">"<nickname>"</span></div>
<div class="line">}</div>
</div><!-- fragment --></li>
</ul>
<p><code>password</code> is used to authorize a client as admin. If no password is given a normal (non-privileged) user session is generated. If a wrong password is given an <code>401</code> error is returned. The <code>nickname</code> can (optionally) be set to have a readable name associated with a session. This name is also returned for each track when using <a href="#get_current_queues">getCurrentQueues</a>.</p>
<p><b>Attention</b>: The <code>nickname</code> is explicitly NOT guaranteed to be unique, so do not use it anywhere to uniquely identify users!</p>
<p><b>TODO</b>: Allow refreshing an old session.</p>
<h3><a class="anchor" id="autotoc_md3"></a>
Response</h3>
<ul>
<li>Statuscode: <br />
200 OK</li>
<li>Body: <br />
<div class="fragment"><div class="line">{</div>
<div class="line"> <span class="stringliteral">"session_id"</span>: <span class="stringliteral">"<session_id>"</span></div>
<div class="line">}</div>
</div><!-- fragment --></li>
</ul>
<h2><a class="anchor" id="query_tracks"></a>
Querying tracks</h2>
<p>Before the user can add tracks to the queue he has to query the available tracks. The available tracks are queried with a user given pattern and are returned in an backend-specific order. To increase flexibility clients may specify the maximum number of tracks returned.</p>
<p><b>Note</b>: In the future some kind of paging may be implemented.</p>
<h3><a class="anchor" id="autotoc_md4"></a>
Request</h3>
<ul>
<li>Method: <br />
<code>GET</code></li>
<li>Path: <br />
<code>/api/v1/queryTracks</code></li>
<li>Parameters:<ul>
<li><code>pattern</code>: A search pattern for filtering (and sorting) the tracks.</li>
<li><code>max_entries</code>: Specifies the maximum number of returned tracks. Optional, defaults to <code>50</code>.</li>
</ul>
</li>
</ul>
<h3><a class="anchor" id="autotoc_md5"></a>
Response</h3>
<div class="fragment"><div class="line">{</div>
<div class="line"> <span class="stringliteral">"tracks"</span>: [</div>
<div class="line"> {</div>
<div class="line"> <span class="stringliteral">"track_id"</span>: <span class="stringliteral">"<track_id>"</span>,</div>
<div class="line"> <span class="stringliteral">"title"</span>: <span class="stringliteral">"<track_title>"</span>,</div>
<div class="line"> <span class="stringliteral">"album"</span>: <span class="stringliteral">"<album_name>"</span>,</div>
<div class="line"> <span class="stringliteral">"artist"</span>: <span class="stringliteral">"<artist_name>"</span>,</div>
<div class="line"> <span class="stringliteral">"duration"</span>: <span class="stringliteral">"<duration>"</span>,</div>
<div class="line"> <span class="stringliteral">"icon_uri"</span>: <span class="stringliteral">"<uri>"</span></div>
<div class="line"> },</div>
<div class="line"> ...</div>
<div class="line"> ]</div>
<div class="line">}</div>
</div><!-- fragment --><p>If a track has no associated <code>album</code> and/or <code>artist</code> these fields may be omitted.</p>
<h2><a class="anchor" id="get_current_queues"></a>
Get current queues</h2>
<p>Queries the current queues (normal and admin queue) as well as the currently playing track.</p>
<p><b>Attention</b>: In the first version this endpoint won't block until a new queue update is available!</p>
<p><b>Note</b>: For now this endpoint does not provide information on since when or how long a track is still playing!</p>
<h3><a class="anchor" id="autotoc_md6"></a>
Request</h3>
<ul>
<li>Method: <br />
<code>GET</code></li>
<li>Path: <br />
<code>/api/v1/getCurrentQueues</code></li>
<li>Parameters:<ul>
<li><code>session_id</code>: The generated session ID for the user.</li>
</ul>
</li>
</ul>
<p>The parameter <code>session_id</code> may be omitted in this version.</p>
<h3><a class="anchor" id="autotoc_md7"></a>
Response</h3>
<div class="fragment"><div class="line">{</div>
<div class="line"> <span class="stringliteral">"currently_playing"</span>: {</div>
<div class="line"> <span class="stringliteral">"track_id"</span>: <span class="stringliteral">"<track_id>"</span>,</div>
<div class="line"> <span class="stringliteral">"title"</span>: <span class="stringliteral">"<track_title>"</span>,</div>
<div class="line"> <span class="stringliteral">"album"</span>: <span class="stringliteral">"<album_name>"</span>,</div>
<div class="line"> <span class="stringliteral">"artist"</span>: <span class="stringliteral">"<artist_name>"</span>,</div>
<div class="line"> <span class="stringliteral">"duration"</span>: <duration>,</div>
<div class="line"> <span class="stringliteral">"icon_uri"</span>: <span class="stringliteral">"<uri>"</span>,</div>
<div class="line"> <span class="stringliteral">"added_by"</span>: <span class="stringliteral">"<nickname>"</span>,</div>
<div class="line"> <span class="stringliteral">"playing"</span>: <span class="keyword">true</span>|<span class="keyword">false</span>,</div>
<div class="line"> <span class="stringliteral">"playing_for"</span>: <playing_for_ms></div>
<div class="line"> },</div>
<div class="line"> <span class="stringliteral">"normal_queue"</span>: [</div>
<div class="line"> {</div>
<div class="line"> <span class="stringliteral">"track_id"</span>: <span class="stringliteral">"<track_id>"</span>,</div>
<div class="line"> <span class="stringliteral">"title"</span>: <span class="stringliteral">"<track_title>"</span>,</div>
<div class="line"> <span class="stringliteral">"album"</span>: <span class="stringliteral">"<album_name>"</span>,</div>
<div class="line"> <span class="stringliteral">"artist"</span>: <span class="stringliteral">"<artist_name>"</span>,</div>
<div class="line"> <span class="stringliteral">"duration"</span>: <duration>,</div>
<div class="line"> <span class="stringliteral">"icon_uri"</span>: <span class="stringliteral">"<uri>"</span>,</div>
<div class="line"> <span class="stringliteral">"added_by"</span>: <span class="stringliteral">"<nickname>"</span>,</div>
<div class="line"> <span class="stringliteral">"votes"</span>: <nr_of_votes>,</div>
<div class="line"> <span class="stringliteral">"current_vote"</span>: <vote></div>
<div class="line"> },</div>
<div class="line"> ...</div>
<div class="line"> ],</div>
<div class="line"> <span class="stringliteral">"admin_queue"</span>: [</div>
<div class="line"> {</div>
<div class="line"> <span class="stringliteral">"track_id"</span>: <span class="stringliteral">"<track_id>"</span>,</div>
<div class="line"> <span class="stringliteral">"title"</span>: <span class="stringliteral">"<track_title>"</span>,</div>
<div class="line"> <span class="stringliteral">"album"</span>: <span class="stringliteral">"<album_name>"</span>,</div>
<div class="line"> <span class="stringliteral">"artist"</span>: <span class="stringliteral">"<artist_name>"</span>,</div>
<div class="line"> <span class="stringliteral">"duration"</span>: <duration>,</div>
<div class="line"> <span class="stringliteral">"icon_uri"</span>: <span class="stringliteral">"<uri>"</span>,</div>
<div class="line"> <span class="stringliteral">"added_by"</span>: <span class="stringliteral">"<nickname>"</span></div>
<div class="line"> },</div>
<div class="line"> ...</div>
<div class="line"> ],</div>
<div class="line">}</div>
</div><!-- fragment --><p>The entries in the normal queue are sorted in the same order as they will be played (no client-side sorting needed!). The field <code>current_vote</code> indicates if the user has already voted for a track (in the normal queue). For now this can either be <code>1</code> or <code>0</code>.<br />
The track listed in <code>currently_playing</code> has an additional field for its current playback status (playing or paused) and the time it has already been played (in milliseconds). The nickname of the user who added a specific track can be found in the <code>added_by</code>.</p>
<p><b>Note</b>: The fields <code>votes</code> and <code>current_vote</code> are only relevant for tracks in the normal queue. While the order of tracks in the normal queue depends on the vote count (and insertion date) the admin queue is ordered only using the insertion date. The currently playing track also does not contain the vote fields because he will not be requeued afterwards anyway.</p>
<h2><a class="anchor" id="add_track"></a>
Add track to queue</h2>
<p>Adds a track to the specified queue on the server.</p>
<p><b>Note</b>: The same track can only be queued once at a time (i.e. as long as a track is returned by <a href="#get_current_queues">getCurrentQueues</a>, it cannot be queued again).</p>
<h3><a class="anchor" id="autotoc_md8"></a>
Request</h3>
<ul>
<li>Method: <br />
<code>POST</code></li>
<li>Path: <br />
<code>/api/v1/addTrackToQueue</code></li>
<li>Body: <br />
<div class="fragment"><div class="line">{</div>
<div class="line"> <span class="stringliteral">"session_id"</span>: <span class="stringliteral">"<session_id>"</span>,</div>
<div class="line"> <span class="stringliteral">"track_id"</span>: <span class="stringliteral">"<track_id>"</span>,</div>
<div class="line"> <span class="stringliteral">"queue_type"</span>: <span class="stringliteral">"<queue_type>"</span></div>
<div class="line">}</div>
</div><!-- fragment --></li>
</ul>
<p><code>session_id</code> is used to authorize the admin when adding a track to the admin queue.<br />
The content for <code>track_id</code> has to be queried with a call to <a href="#query_tracks">queryTracks</a>.<br />
<code>queue_type</code> indicates in which queue the track should be added. Valid values are <code>admin</code> or <code>normal</code>. If omitted it is set to <code>normal</code>.</p>
<h3><a class="anchor" id="autotoc_md9"></a>
Response</h3>
<div class="fragment"><div class="line">{</div>
<div class="line">}</div>
</div><!-- fragment --><p>A successful call responds with an empty JSON object.</p>
<h2><a class="anchor" id="vote_track"></a>
Vote track</h2>
<p>Vote for a track or revoke a vote.</p>
<p><b>Note</b>: A user cannot vote for the same track twice, nor can he revoke non existing votes causing a downvote.</p>
<h3><a class="anchor" id="autotoc_md10"></a>
Request</h3>
<ul>
<li>Method: <br />
<code>PUT</code></li>
<li>Path: <br />
<code>/api/v1/voteTrack</code></li>
<li>Body: <br />
<div class="fragment"><div class="line">{</div>
<div class="line"> <span class="stringliteral">"session_id"</span>: <span class="stringliteral">"<session_id>"</span>,</div>
<div class="line"> <span class="stringliteral">"track_id"</span>: <span class="stringliteral">"<track_id>"</span>,</div>
<div class="line"> <span class="stringliteral">"vote"</span>: <vote></div>
<div class="line">}</div>
</div><!-- fragment --></li>
</ul>
<p>The content for <code>track_id</code> has to be queried with a call to <a href="#query_tracks">queryTracks</a>.<br />
If <code>vote</code> is a <code>0</code> an already given vote is revoked, while setting <code>vote</code> to a non-zero value votes for the track.</p>
<p><b>Note</b>: The actual value of non-zero values are not important (it will always count as <code>1</code>)!</p>
<h3><a class="anchor" id="autotoc_md11"></a>
Response</h3>
<div class="fragment"><div class="line">{</div>
<div class="line">}</div>
</div><!-- fragment --><p>A successful call responds with an empty JSON object.</p>
<h2><a class="anchor" id="control_player"></a>
Control player</h2>
<p>Using this endpoint the client can cause the player behaviour to change.</p>
<p><b>Note</b>: This endpoint can only be used by the admin.</p>
<p><b>Note</b>: For now querying the current player state is not possible!</p>
<h3><a class="anchor" id="autotoc_md12"></a>
Request</h3>
<ul>
<li>Method: <br />
<code>PUT</code></li>
<li>Path: <br />
<code>/api/v1/controlPlayer</code></li>
<li>Body: <br />
<div class="fragment"><div class="line">{</div>
<div class="line"> <span class="stringliteral">"session_id"</span>: <span class="stringliteral">"<session_id>"</span>,</div>
<div class="line"> <span class="stringliteral">"player_action"</span>: <span class="stringliteral">"<player_action>"</span></div>
<div class="line">}</div>
</div><!-- fragment --></li>
</ul>
<p>The value of <code>player_action</code> controls which action the server should take. Valid values are:</p>
<ul>
<li><code>"play"</code>: Starts or resumes playback.</li>
<li><code>"pause"</code>: Pauses the playback. If it is already paused or stopped nothing happens.</li>
<li><code>"skip"</code>: Removes the currently playing (or paused) track and play the next one in the queue. If playback is stopped remove the next queued track without resuming playback.</li>
<li><code>"volume_up"</code>: Raises the volume by a fixed amount if it is not already at its maximum value.</li>
<li><code>"volume_down"</code>: Lowers the volume by a fixed amount if it is not already at its minimum value.</li>
</ul>
<p><b>Note</b>: The current volume level cannot be queried by now.</p>
<h3><a class="anchor" id="autotoc_md13"></a>
Response</h3>
<div class="fragment"><div class="line">{</div>
<div class="line">}</div>
</div><!-- fragment --><p>A successful call responds with an empty JSON object.</p>
<h2><a class="anchor" id="move_track"></a>
Move tracks between queues</h2>
<p>Moving a track between the admin and the normal queue.</p>
<p><b>Note</b>: A move is equivalent to a call to <a href="#remove_track">removeTrack</a> followed by <a href="#add_track">addTrack</a> meaning when moving a track all its fields get reset (i.e. the vote count is set to zero, the nickname is set to the nickname of the admin etc.).</p>
<p><b>Note</b>: This endpoint can only be used by the admin.</p>
<h3><a class="anchor" id="autotoc_md14"></a>
Request</h3>
<ul>
<li>Method: <br />
<code>PUT</code></li>
<li>Path: <br />
<code>/api/v1/moveTrack</code></li>
<li>Body: <br />
<div class="fragment"><div class="line">{</div>
<div class="line"> <span class="stringliteral">"session_id"</span>: <span class="stringliteral">"<session_id>"</span>,</div>
<div class="line"> <span class="stringliteral">"track_id"</span>: <span class="stringliteral">"<track_id>"</span>,</div>
<div class="line"> <span class="stringliteral">"queue_type"</span>: <span class="stringliteral">"<queue_type>"</span></div>
<div class="line">}</div>
</div><!-- fragment --></li>
</ul>
<p><code>track_id</code> specifies the track to be moved. This ID can be received by <a href="#get_current_queues">getCurrentQueues</a>.<br />
<code>queue_type</code> may either be <code>admin</code> or <code>normal</code> depending whether the track should be moved to the admin queue or the normal queue. When <code>queue_type</code> specifies the queue the track is already in, nothing happens (no votes are lost).</p>
<h3><a class="anchor" id="autotoc_md15"></a>
Response</h3>
<div class="fragment"><div class="line">{</div>
<div class="line">}</div>
</div><!-- fragment --><p>A successful call (the track was moved or was already in the right queue) responds with an empty JSON object.</p>
<h2><a class="anchor" id="remove_track"></a>
Remove tracks from queues</h2>
<p>Removes a track from either the admin or the normal queue.</p>
<p><b>Note</b>: This endpoint can only be used by the admin.</p>
<h3><a class="anchor" id="autotoc_md16"></a>
Request</h3>
<ul>
<li>Method: <br />
<code>DELETE</code></li>
<li>Path: <br />
<code>/api/v1/removeTrack</code></li>
<li>Body: <br />
<div class="fragment"><div class="line">{</div>
<div class="line"> <span class="stringliteral">"session_id"</span>: <span class="stringliteral">"<session_id>"</span>,</div>
<div class="line"> <span class="stringliteral">"track_id"</span>: <span class="stringliteral">"<track_id>"</span></div>
<div class="line">}</div>
</div><!-- fragment --></li>
</ul>
<p><code>track_id</code> specifies the track to be removed. Since one track can only be in one queue at a time no ambiguities are possible! This ID can be received by <a href="#get_current_queues">getCurrentQueues</a>.</p>
<h3><a class="anchor" id="autotoc_md17"></a>
Response</h3>
<div class="fragment"><div class="line">{</div>
<div class="line">}</div>
</div><!-- fragment --><p>A successful call responds with an empty JSON object. </p>
</div></div><!-- contents -->
</div><!-- PageDoc -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>