-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSubsonic.html
3765 lines (3492 loc) · 127 KB
/
Subsonic.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
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html class="global"><script type="text/javascript" async="" src="Subsonic_files/ga.js"></script><script async="false" type="text/javascript" src="Subsonic_files/in-page.js"></script><head><meta name="viewport" content="user-scalable=yes,width=device-width,height=device-height,initial-scale=1"><style type="text/css">html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}table{border-collapse:collapse;border-spacing:0}body{-webkit-text-size-adjust:none}</style><style type="text/css">*,*:before,*:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}</style><meta name="viewport" content="initial-scale=1"><style type="text/css">@-ms-viewport{width:device-width;}</style>
<title>Subsonic</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="description" content="">
<meta name="keywords" content="">
<!--[if lte IE 8]>
<script src="css/ie/html5shiv.js"></script><![endif]-->
<script src="Subsonic_files/jquery.min.js"></script>
<script src="Subsonic_files/jquery.dropotron.min.js"></script>
<script src="Subsonic_files/jquery.scrollgress.min.js"></script>
<style type="text/css">.row{border-bottom:solid 1px transparent}.row>*{float:left}.row:after,.row:before{content:"";display:block;clear:both;height:0}.row.uniform>*>:first-child{margin-top:0}.row.uniform>*>:last-child{margin-bottom:0}.\31 2u,.\31 2u\24{width:100%;clear:none}.\31 1u,.\31 1u\24{width:91.6666666667%;clear:none}.\31 0u,.\31 0u\24{width:83.3333333333%;clear:none}.\39 u,.\39 u\24{width:75%;clear:none}.\38 u,.\38 u\24{width:66.6666666667%;clear:none}.\37 u,.\37 u\24{width:58.3333333333%;clear:none}.\36 u,.\36 u\24{width:50%;clear:none}.\35 u,.\35 u\24{width:41.6666666667%;clear:none}.\34 u,.\34 u\24{width:33.3333333333%; clear: none}.\33 u,.\33 u\24{width:25%;clear:none}.\32 u,.\32 u\24{width:16.6666666667%;clear:none}.\31 u,.\31 u\24{width:8.3333333333%;clear:none}.\31 2u\24+*,.\31 1u\24+*,.\31 0u\24+*,.\39 u\24+*,.\38 u\24+*,.\37 u\24+*,.\36 u\24+*,.\35 u\24+*,.\34 u\24+*,.\33 u\24+*,.\32 u\24+*.\31 u\24+*{clear:left;}.\-11u{margin-left:91.6666666667%}.\-10u{margin-left:83.3333333333%}.\-9u{margin-left:75%}.\-8u{margin-left:66.6666666667%}.\-7u{margin-left:58.3333333333%}.\-6u{margin-left:50%}.\-5u{margin-left:41.6666666667%}.\-4u{margin-left:33.3333333333%}.\-3u{margin-left:25%}.\-2u{margin-left:16.6666666667%}.\-1u{margin-left:8.3333333333%}</style><style type="text/css">body{min-width:60em}.container{margin-left:auto;margin-right:auto;width:60em}.container.\31 25\25{width:100%;max-width:75em;min-width:60}.container.\37 5\25{width:45em}.container.\35 0\25{width:30em}.container.\32 5\25{width:15em}</style><style type="text/css">.row>*{padding:0px 0 0 2em}.row{margin:0px 0 0 -2em}.row.uniform>*{padding:2em 0 0 2em}.row.uniform{margin:-2em 0 0 -2em}.row.\32 00\25>*{padding:0px 0 0 4em}.row.\32 00\25{margin:0px 0 0 -4em}.row.uniform.\32 00\25>*{padding:4em 0 0 4em}.row.uniform.\32 00\25{margin:-4em 0 0 -4em}.row.\31 50\25>*{padding:0px 0 0 3em}.row.\31 50\25{margin:0px 0 0 -3em}.row.uniform.\31 50\25>*{padding:3em 0 0 3em}.row.uniform.\31 50\25{margin:-3em 0 0 -3em}.row.\35 0\25>*{padding:0px 0 0 1em}.row.\35 0\25{margin:0px 0 0 -1em}.row.uniform.\35 0\25>*{padding:1em 0 0 1em}.row.uniform.\35 0\25{margin:-1em 0 0 -1em}.row.\32 5\25>*{padding:0px 0 0 0.5em}.row.\32 5\25{margin:0px 0 0 -0.5em}.row.uniform.\32 5\25>*{padding:0.5em 0 0 0.5em}.row.uniform.\32 5\25{margin:-0.5em 0 0 -0.5em}.row.\30 \25>*{padding:0}.row.\30 \25{margin:0}</style><style type="text/css">.\31 2u\28 1\29,.\31 2u\24\28 1\29{width:100%;clear:none}.\31 1u\28 1\29,.\31 1u\24\28 1\29{width:91.6666666667%;clear:none}.\31 0u\28 1\29,.\31 0u\24\28 1\29{width:83.3333333333%;clear:none}.\39 u\28 1\29,.\39 u\24\28 1\29{width:75%;clear:none}.\38 u\28 1\29,.\38 u\24\28 1\29{width:66.6666666667%;clear:none}.\37 u\28 1\29,.\37 u\24\28 1\29{width:58.3333333333%;clear:none}.\36 u\28 1\29,.\36 u\24\28 1\29{width:50%;clear:none}.\35 u\28 1\29,.\35 u\24\28 1\29{width:41.6666666667%;clear:none}.\34 u\28 1\29,.\34 u\24\28 1\29{width:33.3333333333%; clear: none}.\33 u\28 1\29,.\33 u\24\28 1\29{width:25%;clear:none}.\32 u\28 1\29,.\32 u\24\28 1\29{width:16.6666666667%;clear:none}.\31 u\28 1\29,.\31 u\24\28 1\29{width:8.3333333333%;clear:none}.\31 2u\24\28 1\29+*,.\31 1u\24\28 1\29+*,.\31 0u\24\28 1\29+*,.\39 u\24\28 1\29+*,.\38 u\24\28 1\29+*,.\37 u\24\28 1\29+*,.\36 u\24\28 1\29+*,.\35 u\24\28 1\29+*,.\34 u\24\28 1\29+*,.\33 u\24\28 1\29+*,.\32 u\24\28 1\29+*.\31 u\24\28 1\29+*{clear:left;}.\-11u{margin-left:91.6666666667%}.\-10u{margin-left:83.3333333333%}.\-9u{margin-left:75%}.\-8u{margin-left:66.6666666667%}.\-7u{margin-left:58.3333333333%}.\-6u{margin-left:50%}.\-5u{margin-left:41.6666666667%}.\-4u{margin-left:33.3333333333%}.\-3u{margin-left:25%}.\-2u{margin-left:16.6666666667%}.\-1u{margin-left:8.3333333333%}</style><style type="text/css">.not-global{display:none!important}.only-wide,.only-normal,.only-narrow,.only-narrower,.only-mobile,.only-mobilep{display:none!important}</style><link rel="stylesheet" type="text/css" href="Subsonic_files/style.css"><script src="Subsonic_files/skel.min.js"></script>
<script src="Subsonic_files/skel-layers.min.js"></script>
<script src="Subsonic_files/init.js"></script>
<script src="Subsonic_files/FancyZoom.js"></script>
<script src="Subsonic_files/FancyZoomHTML.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-33110060-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<link rel="icon" type="image/png" href="https://www.subsonic.org/pages/inc/img/favicon.png">
<noscript>
<link rel="stylesheet" href="css/skel.css"/>
<link rel="stylesheet" href="css/style.css"/>
<link rel="stylesheet" href="css/style-wide.css"/>
</noscript>
<!--[if lte IE 8]><link rel="stylesheet" href="css/ie/v8.css"/><![endif]-->
</head>
<body data-new-gr-c-s-check-loaded="8.927.0" data-gr-ext-installed=""><div id="skel-layers-wrapper" style="position: absolute; left: 0px; right: 0px; top: 0px;"><div id="ZoomSpin" style="position: absolute; left: 10px; top: 10px; visibility: hidden; z-index: 525;"><img id="SpinImage" src="Subsonic_files/zoom-spin-1.png"></div><div id="ZoomBox" style="position: absolute; left: 10px; top: 10px; visibility: hidden; z-index: 499;"><img src="Subsonic_files/spacer.gif" id="ZoomImage" border="0" style="box-shadow: rgba(0, 0, 0, 0) 0px 5px 25px; display: block; width: 10px; height: 10px; cursor: pointer;"><div id="ZoomClose" style="position: absolute; left: -15px; top: -15px; visibility: hidden;"><img src="Subsonic_files/closebox.png" width="30" height="30" border="0" style="cursor: pointer;"></div></div><div id="ZoomCapDiv" style="position: absolute; visibility: hidden; margin-left: auto; margin-right: auto; z-index: 501;"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td align="right"><img src="Subsonic_files/zoom-caption-l.png" width="13" height="26" style="display: block;"></td><td background="Subsonic_files/zoom-caption-fill.png" id="ZoomCaption" valign="middle" style="font-size: 14px; font-family: Helvetica; font-weight: bold; color: rgb(255, 255, 255); text-shadow: rgb(0, 0, 0) 0px 2px 4px; white-space: nowrap;"></td><td><img src="Subsonic_files/zoom-caption-r.png" width="13" height="26" style="display: block;"></td></tr></tbody></table></div>
<header id="header" class="skel-layers-fixed">
<h1>
<a href="https://www.subsonic.org/pages/index.jsp"><span class="image left"><img src="Subsonic_files/subsonic_logo.png" alt="" style="height: 50px"></span>
Subsonic</a> ... easy listening</h1>
<nav id="nav">
<ul>
<li style="white-space: nowrap;"><a href="https://www.subsonic.org/pages/index.jsp">Home</a></li>
<li style="white-space: nowrap;"><a href="https://www.subsonic.org/pages/premium.jsp">Premium</a></li>
<li style="white-space: nowrap;"><a href="https://www.subsonic.org/pages/apps.jsp">Apps</a></li>
<li style="white-space: nowrap;"><a href="https://www.subsonic.org/pages/sonos.jsp">Sonos</a></li>
<li style="white-space: nowrap;"><a href="https://www.subsonic.org/pages/demo.jsp">Demo</a></li>
<li style="user-select: none; cursor: pointer; white-space: nowrap;" class="opener">
<a href="https://www.subsonic.org/pages/help.jsp" class="icon fa-angle-down">Help</a>
<ul style="user-select: none; display: none; position: absolute;" class="">
<li style="white-space: nowrap;"><a href="https://www.subsonic.org/pages/installation.jsp" style="display: block;">How to Install</a></li>
<li style="white-space: nowrap;"><a href="https://www.subsonic.org/pages/getting-started.jsp" style="display: block;">Getting Started</a></li>
<li style="white-space: nowrap;"><a href="https://www.subsonic.org/pages/features.jsp" style="display: block;">Features</a></li>
<li style="white-space: nowrap;"><a href="https://www.subsonic.org/pages/faq.jsp" style="display: block;">FAQ</a></li>
<li style="white-space: nowrap;"><a href="http://forum.subsonic.org/forum/index.php" style="display: block;">Forum</a></li>
<li style="user-select: none; cursor: pointer; white-space: nowrap;" class="opener">
<a href="" style="display: block;">More...</a>
<ul style="user-select: none; display: none; position: absolute;" class="dropotron">
<li style="white-space: nowrap;"><a href="https://www.subsonic.org/pages/changelog.jsp" style="display: block;">Change Log</a></li>
<li style="white-space: nowrap;"><a href="https://www.subsonic.org/pages/transcoding.jsp" style="display: block;">Transcoding Settings</a></li>
<li style="white-space: nowrap;"><a href="https://www.subsonic.org/pages/database.jsp" style="display: block;">Using an External DB</a></li>
<li style="white-space: nowrap;"><a href="https://www.subsonic.org/pages/translate.jsp" style="display: block;">How to Translate</a></li>
<li style="white-space: nowrap;"><a href="https://www.subsonic.org/pages/privacy.jsp" style="display: block;">Privacy Policy</a></li>
</ul>
</li>
</ul></li>
<li style="white-space: nowrap;"><a href="https://www.subsonic.org/pages/api.jsp">API</a></li>
<li style="white-space: nowrap;"><a href="https://www.subsonic.org/pages/download.jsp" class="button icon fa-download">Download</a></li>
</ul>
</nav>
</header>
<section id="main" class="container">
<header>
<h2>Subsonic API</h2>
</header>
<div class="row">
<div class="12u">
<section class="box">
<p>
The Subsonic API allows anyone to build their own programs using Subsonic as the media server,
whether they're on the web, the desktop or on mobile devices. All the Subsonic <a href="https://www.subsonic.org/pages/apps.jsp">apps</a>
are built using the Subsonic API.
</p>
<p>
Feel free to join the <a target="_blank" href="http://groups.google.com/group/subsonic-app-developers">Subsonic App
Developers</a> group for discussions, suggestions and questions.
</p>
<h3>Introduction</h3>
<p>
The Subsonic API allows you to call methods that respond in
<a target="_blank" href="http://en.wikipedia.org/wiki/Representational_State_Transfer">REST</a> style xml.
Individual methods are detailed below.
</p>
<p>
Please note that all methods take the following parameters:
</p>
<div class="table-wrapper">
<table class="alt">
<thead>
<tr>
<th>Parameter</th>
<th>Required</th>
<th>Default</th>
<th>Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>u</code></td>
<td>Yes</td>
<td></td>
<td>The username.</td>
</tr>
<tr>
<td><code>p</code></td>
<td>Yes*</td>
<td></td>
<td>The password, either in clear text or hex-encoded with a "enc:" prefix. Since <a href="#versions">1.13.0</a>
this should only be used for testing purposes.</td>
</tr>
<tr>
<td><code>t</code></td>
<td>Yes*</td>
<td></td>
<td>(Since <a href="#versions">1.13.0</a>) The authentication token computed as <strong>md5(password + salt)</strong>.
See below for details.</td>
</tr>
<tr>
<td><code>s</code></td>
<td>Yes*</td>
<td></td>
<td>(Since <a href="#versions">1.13.0</a>) A random string ("salt") used as input for computing the password hash.
See below for details.</td>
</tr>
<tr>
<td><code>v</code></td>
<td>Yes</td>
<td></td>
<td>The protocol version implemented by the client, i.e., the version of the
<a href="#versions">subsonic-rest-api.xsd</a> schema used (see below).
</td>
</tr>
<tr>
<td><code>c</code></td>
<td>Yes</td>
<td></td>
<td>A unique string identifying the client application.</td>
</tr>
<tr>
<td><code>f</code></td>
<td>No</td>
<td>xml</td>
<td>Request data to be returned in this format. Supported values are "xml", "json" (since <a href="#versions">1.4.0</a>) and "jsonp" (since <a href="#versions">1.6.0</a>). If
using jsonp, specify name of javascript callback function using a <code>callback</code>
parameter.
</td>
</tr>
</tbody>
</table>
</div>
<p>
*) Either <code>p</code> or <em>both</em> <code>t</code> and <code>s</code> must be specified.
</p>
<p>
Remember to <a href="http://www.w3schools.com/tags/ref_urlencode.asp">URL encode</a> the request parameters.
All methods (except those that return binary data) returns XML documents conforming to the
<a href="#versions">subsonic-rest-api.xsd</a> schema. The XML documents are encoded with UTF-8.
</p>
<h3>Authentication</h3>
<p>
If your targeting API version <a href="#versions">1.12.0</a> or earlier, authentication is performed by sending
the password as clear text or hex-encoded. Examples:
</p>
<p>
<code>http://your-server/rest/ping.view?u=joe&p=sesame&v=1.12.0&c=myapp</code>
<br>
<code>http://your-server/rest/ping.view?u=joe&p=enc:736573616d65&v=1.12.0&c=myapp</code>
</p>
<p>
Starting with API version <a href="#versions">1.13.0</a>, the recommended authentication scheme is to send
an authentication token, calculated as a <em>one-way salted hash</em> of the password.
</p>
<p>This involves two steps:</p>
<ol>
<li>For each REST call, generate a random string called the <em>salt</em>. Send this as parameter <code>s</code>.</li>
Use a salt length of at least six characters.
<li>Calculate the authentication token as follows: <strong>token = md5(password + salt)</strong>.
The md5() function takes a string and returns the 32-byte ASCII
hexadecimal representation of the MD5 hash, using lower case
characters for the hex values. The '+' operator represents
concatenation of the two strings. Treat the strings
as UTF-8 encoded when calculating the hash. Send the result as
parameter <code>t</code>.
</li>
</ol>
<p>
For example: if the password is <strong>sesame</strong> and the random salt is <strong>c19b2d</strong>, then
<strong>token = md5("sesamec19b2d") = 26719a1196d2a940705a59634eb18eab</strong>. The corresponding request URL then becomes:
</p>
<p>
<code>http://your-server/rest/ping.view?u=joe&t=26719a1196d2a940705a59634eb18eab&s=c19b2d&v=1.12.0&c=myapp</code>
</p>
<h3>Error handling</h3>
<p>
If a method fails it will return an error code and message in an <code><error></code> element.
In addition, the <code>status</code> attribute of the <code><subsonic-response></code> root
element will be set to <code>failed</code> instead of <code>ok</code>. For example:
</p>
<p class="codeblock">
<?xml version="1.0" encoding="UTF-8"?><br>
<subsonic-response xmlns="http://subsonic.org/restapi" status="failed" version="1.1.0"><br>
<error code="40" message="Wrong username or password"/><br>
</subsonic-response><br>
</p>
<p>
The following error codes are defined:
</p>
<div class="table-wrapper">
<table class="alt">
<thead>
<tr>
<th>Code</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>A generic error.</td>
</tr>
<tr>
<td>10</td>
<td>Required parameter is missing.</td>
</tr>
<tr>
<td>20</td>
<td>Incompatible Subsonic REST protocol version. Client must upgrade.</td>
</tr>
<tr>
<td>30</td>
<td>Incompatible Subsonic REST protocol version. Server must upgrade.</td>
</tr>
<tr>
<td>40</td>
<td>Wrong username or password.</td>
</tr>
<tr>
<td>41</td>
<td>Token authentication not supported for LDAP users.</td>
</tr>
<tr>
<td>50</td>
<td>User is not authorized for the given operation.</td>
</tr>
<tr>
<td>60</td>
<td>The trial period for the Subsonic server is over. Please upgrade to Subsonic Premium.
Visit subsonic.org for details.
</td>
</tr>
<tr>
<td>70</td>
<td>The requested data was not found.</td>
</tr>
</tbody>
</table>
</div>
<h3><a name="versions"></a>Versions</h3>
<p>
This table shows the REST API version implemented in different Subsonic versions:
</p>
<div class="table-wrapper">
<table class="alt">
<thead>
<tr>
<th>Subsonic version</th>
<th>REST API version</th>
</tr>
</thead>
<tbody>
<tr>
<td>6.1.4</td>
<td>
<a href="https://www.subsonic.org/pages/inc/api/schema/subsonic-rest-api-1.16.1.xsd">1.16.1</a>
</td>
</tr>
<tr>
<td>6.1.2</td>
<td>
<a href="https://www.subsonic.org/pages/inc/api/schema/subsonic-rest-api-1.16.0.xsd">1.16.0</a>
</td>
</tr>
<tr>
<td>6.1</td>
<td>
<a href="https://www.subsonic.org/pages/inc/api/schema/subsonic-rest-api-1.15.0.xsd">1.15.0</a>
</td>
</tr>
<tr>
<td>6.0</td>
<td>
<a href="https://www.subsonic.org/pages/inc/api/schema/subsonic-rest-api-1.14.0.xsd">1.14.0</a>
</td>
</tr>
<tr>
<td>5.3</td>
<td>
<a href="https://www.subsonic.org/pages/inc/api/schema/subsonic-rest-api-1.13.0.xsd">1.13.0</a>
</td>
</tr>
<tr>
<td>5.2</td>
<td>
<a href="https://www.subsonic.org/pages/inc/api/schema/subsonic-rest-api-1.12.0.xsd">1.12.0</a>
</td>
</tr>
<tr>
<td>5.1</td>
<td>
<a href="https://www.subsonic.org/pages/inc/api/schema/subsonic-rest-api-1.11.0.xsd">1.11.0</a>
</td>
</tr>
<tr>
<td>4.9</td>
<td>
<a href="https://www.subsonic.org/pages/inc/api/schema/subsonic-rest-api-1.10.2.xsd">1.10.2</a>
</td>
</tr>
<tr>
<td>4.8</td>
<td>
<a href="https://www.subsonic.org/pages/inc/api/schema/subsonic-rest-api-1.9.0.xsd">1.9.0</a>
</td>
</tr>
<tr>
<td>4.7</td>
<td>
<a href="https://www.subsonic.org/pages/inc/api/schema/subsonic-rest-api-1.8.0.xsd">1.8.0</a>
</td>
</tr>
<tr>
<td>4.6</td>
<td>
<a href="https://www.subsonic.org/pages/inc/api/schema/subsonic-rest-api-1.7.0.xsd">1.7.0</a>
</td>
</tr>
<tr>
<td>4.5</td>
<td>
<a href="https://www.subsonic.org/pages/inc/api/schema/subsonic-rest-api-1.6.0.xsd">1.6.0</a>
</td>
</tr>
<tr>
<td>4.4</td>
<td>
<a href="https://www.subsonic.org/pages/inc/api/schema/subsonic-rest-api-1.5.0.xsd">1.5.0</a>
</td>
</tr>
<tr>
<td>4.2</td>
<td>
<a href="https://www.subsonic.org/pages/inc/api/schema/subsonic-rest-api-1.4.0.xsd">1.4.0</a>
</td>
</tr>
<tr>
<td>4.1</td>
<td>
<a href="https://www.subsonic.org/pages/inc/api/schema/subsonic-rest-api-1.3.0.xsd">1.3.0</a>
</td>
</tr>
<tr>
<td>4.0</td>
<td>
<a href="https://www.subsonic.org/pages/inc/api/schema/subsonic-rest-api-1.2.0.xsd">1.2.0</a>
</td>
</tr>
<tr>
<td>3.9</td>
<td>
<a href="https://www.subsonic.org/pages/inc/api/schema/subsonic-rest-api-1.1.1.xsd">1.1.1</a>
</td>
</tr>
<tr>
<td>3.8</td>
<td>
<a href="https://www.subsonic.org/pages/inc/api/schema/subsonic-rest-api-1.1.0.xsd">1.1.0</a>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Note that a Subsonic server is backward compatible with a REST client if and only if the major version is the same,
and the minor version of the client is less than or equal to the server's. For example, if the server has
REST API version 2.2, it supports client versions 2.0, 2.1 and 2.2, but not versions 1.x, 2.3+ or 3.x. The third
part of the version number is not used to determine compatibility.
</p>
<h3>File structure vs ID3 tags</h3>
<p>
Starting with version <a href="#versions">1.8.0</a>, the API provides methods for accessing the media collection
organized according to ID3 tags, rather than file structure.
</p>
<p>
For instance, browsing through the collection using ID3 tags should use the <code>getArtists</code>,
<code>getArtist</code>
and <code>getAlbum</code> methods.
To browse using file structure you would use <code>getIndexes</code> and <code>getMusicDirectory</code>.
</p>
<p>
Correspondingly, there are two sets of methods for searching, starring and album lists. Refer to the method
documentation for details.
</p>
<h2>API method documentation</h2>
<div class="table-wrapper">
<table class="alt">
<tbody>
<tr>
<td>System</td>
<td>
<code><a href="#ping">ping</a></code>
<code><a href="#getLicense">getLicense</a></code>
</td>
</tr>
<tr>
<td>Browsing</td>
<td>
<code><a href="#getMusicFolders">getMusicFolders</a></code>
<code><a href="#getIndexes">getIndexes</a></code>
<code><a href="#getMusicDirectory">getMusicDirectory</a></code>
<code><a href="#getGenres">getGenres</a></code>
<code><a href="#getArtists">getArtists</a></code>
<code><a href="#getArtist">getArtist</a></code>
<code><a href="#getAlbum">getAlbum</a></code>
<code><a href="#getSong">getSong</a></code>
<code><a href="#getVideos">getVideos</a></code>
<code><a href="#getVideoInfo">getVideoInfo</a></code>
<code><a href="#getArtistInfo">getArtistInfo</a></code>
<code><a href="#getArtistInfo2">getArtistInfo2</a></code>
<code><a href="#getAlbumInfo">getAlbumInfo</a></code>
<code><a href="#getAlbumInfo2">getAlbumInfo2</a></code>
<code><a href="#getSimilarSongs">getSimilarSongs</a></code>
<code><a href="#getSimilarSongs2">getSimilarSongs2</a></code>
<code><a href="#getTopSongs">getTopSongs</a></code>
</td>
</tr>
<tr>
<td>Album/song lists</td>
<td>
<code><a href="#getAlbumList">getAlbumList</a></code>
<code><a href="#getAlbumList2">getAlbumList2</a></code>
<code><a href="#getRandomSongs">getRandomSongs</a></code>
<code><a href="#getSongsByGenre">getSongsByGenre</a></code>
<code><a href="#getNowPlaying">getNowPlaying</a></code>
<code><a href="#getStarred">getStarred</a></code>
<code><a href="#getStarred2">getStarred2</a></code>
</td>
</tr>
<tr>
<td>Searching</td>
<td>
<code><a href="#search">search</a></code>
<code><a href="#search2">search2</a></code>
<code><a href="#search3">search3</a></code>
</td>
</tr>
<tr>
<td>Playlists</td>
<td>
<code><a href="#getPlaylists">getPlaylists</a></code>
<code><a href="#getPlaylist">getPlaylist</a></code>
<code><a href="#createPlaylist">createPlaylist</a></code>
<code><a href="#updatePlaylist">updatePlaylist</a></code>
<code><a href="#deletePlaylist">deletePlaylist</a></code>
</td>
</tr>
<tr>
<td>Media retrieval</td>
<td>
<code><a href="#stream">stream</a></code>
<code><a href="#download">download</a></code>
<code><a href="#hls">hls</a></code>
<code><a href="#getCaptions">getCaptions</a></code>
<code><a href="#getCoverArt">getCoverArt</a></code>
<code><a href="#getLyrics">getLyrics</a></code>
<code><a href="#getAvatar">getAvatar</a></code>
</td>
</tr>
<tr>
<td>Media annotation</td>
<td>
<code><a href="#star">star</a></code>
<code><a href="#unstar">unstar</a></code>
<code><a href="#setRating">setRating</a></code>
<code><a href="#scrobble">scrobble</a></code>
</td>
</tr>
<tr>
<td>Sharing</td>
<td>
<code><a href="#getShares">getShares</a></code>
<code><a href="#createShare">createShare</a></code>
<code><a href="#updateShare">updateShare</a></code>
<code><a href="#deleteShare">deleteShare</a></code>
</td>
</tr>
<tr>
<td>Podcast</td>
<td>
<code><a href="#getPodcasts">getPodcasts</a></code>
<code><a href="#getNewestPodcasts">getNewestPodcasts</a></code>
<code><a href="#refreshPodcasts">refreshPodcasts</a></code>
<code><a href="#createPodcastChannel">createPodcastChannel</a></code>
<code><a href="#deletePodcastChannel">deletePodcastChannel</a></code>
<code><a href="#deletePodcastEpisode">deletePodcastEpisode</a></code>
<code><a href="#downloadPodcastEpisode">downloadPodcastEpisode</a></code>
</td>
</tr>
<tr>
<td>Jukebox</td>
<td>
<code><a href="#jukeboxControl">jukeboxControl</a></code>
</td>
</tr>
<tr>
<td>Internet radio</td>
<td>
<code><a href="#getInternetRadioStations">getInternetRadioStations</a></code>
<code><a href="#createInternetRadioStation">createInternetRadioStation</a></code>
<code><a href="#updateInternetRadioStation">updateInternetRadioStation</a></code>
<code><a href="#deleteInternetRadioStation">deleteInternetRadioStation</a></code>
</td>
</tr>
<tr>
<td>Chat</td>
<td>
<code><a href="#getChatMessages">getChatMessages</a></code>
<code><a href="#addChatMessage">addChatMessage</a></code>
</td>
</tr>
<tr>
<td style="white-space: nowrap">User management</td>
<td>
<code><a href="#getUser">getUser</a></code>
<code><a href="#getUsers">getUsers</a></code>
<code><a href="#createUser">createUser</a></code>
<code><a href="#updateUser">updateUser</a></code>
<code><a href="#deleteUser">deleteUser</a></code>
<code><a href="#changePassword">changePassword</a></code>
</td>
</tr>
<tr>
<td>Bookmarks</td>
<td>
<code><a href="#getBookmarks">getBookmarks</a></code>
<code><a href="#createBookmark">createBookmark</a></code>
<code><a href="#deleteBookmark">deleteBookmark</a></code>
<code><a href="#getPlayQueue">getPlayQueue</a></code>
<code><a href="#savePlayQueue">savePlayQueue</a></code>
</td>
</tr>
<tr>
<td>Media library scanning</td>
<td>
<code><a href="#getScanStatus">getScanStatus</a></code>
<code><a href="#startScan">startScan</a></code>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<a name="ping"></a>
<section class="box">
<h3>ping</h3>
<p>
<code>http://your-server/rest/ping</code>
Since <a href="#versions">1.0.0</a>
</p>
<p>
Used to test connectivity with the server. Takes no extra parameters.
</p>
<p>
Returns an empty <code><subsonic-response></code> element on success. <a href="https://www.subsonic.org/pages/inc/api/examples/ping_example_1.xml">Example</a>.
</p>
</section>
<a name="getLicense"></a>
<section class="box">
<h3>getLicense</h3>
<p>
<code>http://your-server/rest/getLicense</code>
Since <a href="#versions">1.0.0</a>
</p>
<p>
Get details about the software license. Takes no extra parameters. Please note that access to the
REST API requires that the server has a valid license (after a 30-day trial period). To get a license key you must
upgrade to <a href="https://www.subsonic.org/pages/premium.jsp">Subsonic Premium</a>.
</p>
<p>
Returns a <code><subsonic-response></code> element with a nested <code><license></code>
element on success. <a href="https://www.subsonic.org/pages/inc/api/examples/license_example_1.xml">Example</a>.
</p>
</section>
<a name="getMusicFolders"></a>
<section class="box">
<h3>getMusicFolders</h3>
<p>
<code>http://your-server/rest/getMusicFolders</code>
Since <a href="#versions">1.0.0</a>
</p>
<p>
Returns all configured top-level music folders. Takes no extra parameters.
</p>
<p>
Returns a <code><subsonic-response></code> element with a nested <code><musicFolders></code>
element on success. <a href="https://www.subsonic.org/pages/inc/api/examples/musicFolders_example_1.xml">Example</a>.
</p>
</section>
<a name="getIndexes"></a>
<section class="box">
<h3>getIndexes</h3>
<p>
<code>http://your-server/rest/getIndexes</code>
Since <a href="#versions">1.0.0</a>
</p>
<p>
Returns an indexed structure of all artists.
</p>
<table>
<tbody><tr>
<th>Parameter</th>
<th>Required</th>
<th>Default</th>
<th>Comment</th>
</tr>
<tr>
<td><code>musicFolderId</code></td>
<td>No</td>
<td></td>
<td>If specified, only return artists in the music folder with the given ID. See
<code>getMusicFolders</code>.
</td>
</tr>
<tr>
<td><code>ifModifiedSince</code></td>
<td>No</td>
<td></td>
<td>If specified, only return a result if the artist collection has changed since the given time (in
milliseconds since 1 Jan 1970).
</td>
</tr>
</tbody></table>
<p>
Returns a <code><subsonic-response></code> element with a nested <code><indexes></code>
element on success. <a href="https://www.subsonic.org/pages/inc/api/examples/indexes_example_1.xml">Example</a>.
</p>
</section>
<a name="getMusicDirectory"></a>
<section class="box">
<h3>getMusicDirectory</h3>
<p>
<code>http://your-server/rest/getMusicDirectory</code>
<br>Since <a href="#versions">1.0.0</a>
</p>
<p>
Returns a listing of all files in a music directory. Typically used to get list of albums for an artist,
or list of songs for an album.
</p>
<table>
<tbody><tr>
<th>Parameter</th>
<th>Required</th>
<th>Default</th>
<th>Comment</th>
</tr>
<tr>
<td><code>id</code></td>
<td>Yes</td>
<td></td>
<td>A string which uniquely identifies the music folder. Obtained by calls to getIndexes or
getMusicDirectory.
</td>
</tr>
</tbody></table>
<p>
Returns a <code><subsonic-response></code> element with a nested <code><directory></code>
element on success.
<a href="https://www.subsonic.org/pages/inc/api/examples/directory_example_1.xml">Example 1</a>.
<a href="https://www.subsonic.org/pages/inc/api/examples/directory_example_2.xml">Example 2</a>.
</p>
</section>
<a name="getGenres"></a>
<section class="box">
<h3>getGenres</h3>
<p>
<code>http://your-server/rest/getGenres</code>
Since <a href="#versions">1.9.0</a>
</p>
<p>
Returns all genres.
</p>
<p>
Returns a <code><subsonic-response></code> element with a nested <code><genres></code>
element on success. <a href="https://www.subsonic.org/pages/inc/api/examples/genres_example_1.xml">Example</a>.
</p>
</section>
<a name="getArtists"></a>
<section class="box">
<h3>getArtists</h3>
<p>
<code>http://your-server/rest/getArtists</code>
Since <a href="#versions">1.8.0</a>
</p>
<p>
Similar to <code>getIndexes</code>, but organizes music according to ID3 tags.
</p>
<table>
<tbody><tr>
<th>Parameter</th>
<th>Required</th>
<th>Default</th>
<th>Comment</th>
</tr>
<tr>
<td><code>musicFolderId</code></td>
<td>No</td>
<td></td>
<td>If specified, only return artists in the music folder with the given ID. See
<code>getMusicFolders</code>.
</td>
</tr>
</tbody></table>
<p>
Returns a <code><subsonic-response></code> element with a nested <code><artists></code>
element on success. <a href="https://www.subsonic.org/pages/inc/api/examples/artists_example_1.xml">Example</a>.
</p>
</section>
<a name="getArtist"></a>
<section class="box">
<h3>getArtist</h3>
<p>
<code>http://your-server/rest/getArtist</code>
Since <a href="#versions">1.8.0</a>
</p>
<p>
Returns details for an artist, including a list of albums. This method organizes music according to ID3 tags.
</p>
<table>
<tbody><tr>
<th>Parameter</th>
<th>Required</th>
<th>Default</th>
<th>Comment</th>
</tr>
<tr>
<td><code>id</code></td>
<td>Yes</td>
<td></td>
<td>The artist ID.</td>
</tr>
</tbody></table>
<p>
Returns a <code><subsonic-response></code> element with a nested <code><artist></code>
element on success.
<a href="https://www.subsonic.org/pages/inc/api/examples/artist_example_1.xml">Example</a>.
</p>
</section>
<a name="getAlbum"></a>
<section class="box">
<h3>getAlbum</h3>
<p>
<code>http://your-server/rest/getAlbum</code>
<br>Since <a href="#versions">1.8.0</a>
</p>
<p>
Returns details for an album, including a list of songs. This method organizes music according to ID3 tags.
</p>
<table>
<tbody><tr>
<th>Parameter</th>
<th>Required</th>
<th>Default</th>
<th>Comment</th>
</tr>
<tr>
<td><code>id</code></td>
<td>Yes</td>
<td></td>
<td>The album ID.</td>
</tr>
</tbody></table>
<p>
Returns a <code><subsonic-response></code> element with a nested <code><album></code>
element on success.
<a href="https://www.subsonic.org/pages/inc/api/examples/album_example_1.xml">Example</a>.
</p>
</section>
<a name="getSong"></a>
<section class="box">
<h3>getSong</h3>
<p>
<code>http://your-server/rest/getSong</code>
Since <a href="#versions">1.8.0</a>
</p>
<p>
Returns details for a song.
</p>
<table>
<tbody><tr>
<th>Parameter</th>
<th>Required</th>
<th>Default</th>
<th>Comment</th>
</tr>
<tr>
<td><code>id</code></td>
<td>Yes</td>
<td></td>
<td>The song ID.</td>
</tr>
</tbody></table>
<p>
Returns a <code><subsonic-response></code> element with a nested <code><song></code>
element on success.
<a href="https://www.subsonic.org/pages/inc/api/examples/song_example_1.xml">Example</a>.
</p>
</section>
<a name="getVideos"></a>
<section class="box">
<h3>getVideos</h3>
<p>
<code>http://your-server/rest/getVideos</code>
Since <a href="#versions">1.8.0</a>
</p>
<p>
Returns all video files.
</p>
<p>
Returns a <code><subsonic-response></code> element with a nested <code><videos></code>
element on success. <a href="https://www.subsonic.org/pages/inc/api/examples/videos_example_1.xml">Example</a>.
</p>
</section>
<a name="getVideoInfo"></a>
<section class="box">
<h3>getVideoInfo</h3>
<p>
<code>http://your-server/rest/getVideoInfo</code>
Since <a href="#versions">1.14.0</a>
</p>
<p>
Returns details for a video, including information about available audio tracks, subtitles (captions) and conversions.
</p>
<table>
<tbody><tr>
<th>Parameter</th>
<th>Required</th>
<th>Default</th>
<th>Comment</th>
</tr>
<tr>
<td><code>id</code></td>
<td>Yes</td>
<td></td>
<td>The video ID.</td>
</tr>
</tbody></table>
<p>
Returns a <code><subsonic-response></code> element with a nested <code><videoInfo></code>
element on success.
<a href="https://www.subsonic.org/pages/inc/api/examples/videoInfo_example_1.xml">Example</a>.
</p>
</section>
<a name="getArtistInfo"></a>
<section class="box">
<h3>getArtistInfo</h3>
<p>
<code>http://your-server/rest/getArtistInfo</code>
Since <a href="#versions">1.11.0</a>
</p>
<p>
Returns artist info with biography, image URLs and similar artists, using data
from <a href="http://last.fm/" target="_blank">last.fm</a>.
</p>
<table>
<tbody><tr>
<th>Parameter</th>
<th>Required</th>
<th>Default</th>
<th>Comment</th>
</tr>
<tr>
<td><code>id</code></td>
<td>Yes</td>
<td></td>
<td>The artist, album or song ID.</td>
</tr>
<tr>
<td><code>count</code></td>
<td>No</td>
<td>20</td>
<td>Max number of similar artists to return.</td>
</tr>
<tr>
<td><code>includeNotPresent</code></td>
<td>No</td>
<td>false</td>
<td>Whether to return artists that are not present in the media library.</td>
</tr>
</tbody></table>
<p>
Returns a <code><subsonic-response></code> element with a nested <code><artistInfo></code>
element on success.
<a href="https://www.subsonic.org/pages/inc/api/examples/artistInfo_example_1.xml">Example</a>.