-
Notifications
You must be signed in to change notification settings - Fork 0
/
RadioBrowser.json
999 lines (999 loc) · 27.2 KB
/
RadioBrowser.json
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
{
"openapi": "3.0.3",
"info": {
"title": "Radio Browser OpenAPI",
"description": "https://api.radio-browser.info/",
"version": "1.0.0"
},
"servers": [
{
"url": "https://{host}/json",
"variables": {
"host": {
"default": "de1.api.radio-browser.info"
}
}
}
],
"tags": [
{
"name": "RadioBrowser",
"description": "The general tag"
}
],
"paths": {
"/countries": {
"get": {
"tags": [
"RadioBrowser"
],
"summary": "A JSON-encoded list of all countries in the database. If a filter is given, it will only return the ones containing the filter as substring",
"operationId": "getCountries",
"parameters": [
{
"$ref": "param/Filter.json#/order"
},
{
"$ref": "param/Filter.json#/reverse"
},
{
"$ref": "param/Filter.json#/hidebroken"
},
{
"$ref": "param/Filter.json#/offset"
},
{
"$ref": "param/Filter.json#/limit"
}
],
"responses": {
"200": {
"description": "Successful operation",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "object/Country.json"
}
}
}
}
}
}
}
},
"/codecs": {
"get": {
"tags": [
"RadioBrowser"
],
"summary": "A JSON-encoded list of all codecs in the database. If a filter is given, it will only return the ones containing the filter as substring",
"operationId": "getCodecs",
"parameters": [
{
"$ref": "param/Filter.json#/order"
},
{
"$ref": "param/Filter.json#/reverse"
},
{
"$ref": "param/Filter.json#/hidebroken"
},
{
"$ref": "param/Filter.json#/offset"
},
{
"$ref": "param/Filter.json#/limit"
}
],
"responses": {
"200": {
"description": "Successful operation",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "object/Codec.json"
}
}
}
}
}
}
}
},
"/states": {
"get": {
"tags": [
"RadioBrowser"
],
"summary": "A JSON-encoded list of all states in the database. Countries are divided into states. If a filter is given, it will only return the ones containing the filter as substring. If a country is given, it will only display states in this country",
"operationId": "getStates",
"parameters": [
{
"$ref": "param/Filter.json#/order"
},
{
"$ref": "param/Filter.json#/reverse"
},
{
"$ref": "param/Filter.json#/hidebroken"
},
{
"$ref": "param/Filter.json#/offset"
},
{
"$ref": "param/Filter.json#/limit"
},
{
"name": "country",
"in": "query",
"description": "Filter states by country name",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful operation",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "object/State.json"
}
}
}
}
}
}
}
},
"/languages": {
"get": {
"tags": [
"RadioBrowser"
],
"summary": "A JSON-encoded list of all languages in the database. If a filter is given, it will only return the ones containing the filter as substring",
"operationId": "getLanguages",
"parameters": [
{
"$ref": "param/Filter.json#/order"
},
{
"$ref": "param/Filter.json#/reverse"
},
{
"$ref": "param/Filter.json#/hidebroken"
},
{
"$ref": "param/Filter.json#/offset"
},
{
"$ref": "param/Filter.json#/limit"
}
],
"responses": {
"200": {
"description": "Successful operation",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "object/Language.json"
}
}
}
}
}
}
}
},
"/tags": {
"get": {
"tags": [
"RadioBrowser"
],
"summary": "A JSON-encoded list of all tags in the database. If a filter is given, it will only return the ones containing the filter as substring",
"operationId": "getTags",
"parameters": [
{
"$ref": "param/Filter.json#/order"
},
{
"$ref": "param/Filter.json#/reverse"
},
{
"$ref": "param/Filter.json#/hidebroken"
},
{
"$ref": "param/Filter.json#/offset"
},
{
"$ref": "param/Filter.json#/limit"
}
],
"responses": {
"200": {
"description": "Successful operation",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "object/Tag.json"
}
}
}
}
}
}
}
},
"/checks": {
"get": {
"tags": [
"RadioBrowser"
],
"summary": "A list of station check results. If a station UUID is provided, the whole history will be returned. If a station ID is not provided, a list of all last checks of all stations will be sent (without older check results)",
"operationId": "getStationChecks",
"parameters": [
{
"name": "stationuuid",
"in": "query",
"description": "If set, only list check result of the matching station",
"schema": {
"type": "string"
}
},
{
"name": "lastcheckuuid",
"in": "query",
"description": "If set, only list checks after the check with the given check",
"schema": {
"type": "string"
}
},
{
"name": "seconds",
"in": "query",
"description": "if > 0, it will only return history entries from the last 'seconds' seconds",
"schema": {
"type": "integer",
"format": "int64",
"default": "0"
}
},
{
"$ref": "param/Filter.json#/limit"
}
],
"responses": {
"200": {
"description": "Successful operation",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "object/StationCheck.json"
}
}
}
}
}
}
}
},
"/clicks": {
"get": {
"tags": [
"RadioBrowser"
],
"summary": "A list of station clicks. If a station UUID is provided, only clicks of the station will be returned. If a station UUID is not provided, a list of all clicks of all stations will be sent (chunksize 10000)",
"operationId": "getStationClicks",
"parameters": [
{
"name": "stationuuid",
"in": "query",
"description": "If set, only list check result of the matching station",
"schema": {
"type": "string"
}
},
{
"name": "lastclickuuid",
"in": "query",
"description": "If set, only list clicks after the click with the given uuid. Use this to continue chunked retrieval to get the next 10000 clicks",
"schema": {
"type": "string"
}
},
{
"name": "seconds",
"in": "query",
"description": "if > 0, it will only return history entries from the last 'seconds' seconds",
"schema": {
"type": "integer",
"format": "int64",
"default": "0"
}
}
],
"responses": {
"200": {
"description": "Successful operation",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "object/StationClick.json"
}
}
}
}
}
}
}
},
"/checksteps": {
"get": {
"tags": [
"RadioBrowser"
],
"summary": "A list of steps that needed to be done to finish a station check",
"operationId": "getStationsCheckSteps",
"parameters": [
{
"name": "uuids",
"in": "query",
"required": true,
"description": "Comma-separated list of UUIDs of stations, may be array in JSON",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful operation",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "object/StationCheckStep.json"
}
}
}
}
}
}
}
},
"/stations/search": {
"get": {
"tags": [
"RadioBrowser"
],
"summary": "A list of radio stations that match the search. It will search for the station whose attribute contains the search term",
"operationId": "findStations",
"parameters": [
{
"name": "name",
"in": "query",
"description": "Name of the station",
"schema": {
"type": "string"
}
},
{
"name": "nameExact",
"in": "query",
"description": "True: only exact matches, otherwise all matches",
"schema": {
"type": "boolean",
"default": "false"
}
},
{
"name": "country",
"in": "query",
"description": "Country of the station",
"schema": {
"type": "string"
}
},
{
"name": "countryExact",
"in": "query",
"description": "True: only exact matches, otherwise all matches",
"schema": {
"type": "boolean",
"default": "false"
}
},
{
"name": "countrycode",
"in": "query",
"description": "2-digit countrycode of the station (see ISO 3166-1 alpha-2)",
"schema": {
"type": "string"
}
},
{
"name": "state",
"in": "query",
"description": "State of the station",
"schema": {
"type": "string"
}
},
{
"name": "stateExact",
"in": "query",
"description": "True: only exact matches, otherwise all matches",
"schema": {
"type": "boolean",
"default": "false"
}
},
{
"name": "language",
"in": "query",
"description": "Language of the station",
"schema": {
"type": "string"
}
},
{
"name": "languageExact",
"in": "query",
"description": "True: only exact matches, otherwise all matches",
"schema": {
"type": "boolean",
"default": "false"
}
},
{
"name": "tag",
"in": "query",
"description": "Tag of the station",
"schema": {
"type": "string"
}
},
{
"name": "tagExact",
"in": "query",
"description": "True: only exact matches, otherwise all matches",
"schema": {
"type": "boolean",
"default": "false"
}
},
{
"name": "tagList",
"in": "query",
"description": "A comma-separated list of tag. It can also be an array of string in JSON HTTP POST parameters. All tags in list have to match.",
"schema": {
"type": "string"
}
},
{
"name": "codec",
"in": "query",
"description": "Codec of the station",
"schema": {
"type": "string"
}
},
{
"name": "bitrateMin",
"in": "query",
"description": "Minimum of kbps for bitrate field of stations in result",
"schema": {
"type": "integer",
"format": "int32",
"default": "0"
}
},
{
"name": "bitrateMax",
"in": "query",
"description": "Maximum of kbps for bitrate field of stations in result",
"schema": {
"type": "integer",
"format": "int32",
"default": "1000000"
}
},
{
"name": "has_geo_info",
"in": "query",
"description": "Not set=display all, true=show only stations with geo_info, false=show only stations without geo_info",
"schema": {
"type": "boolean"
}
},
{
"name": "has_extended_info",
"in": "query",
"description": "Not set=display all, true=show only stations which do provide extended information, false=show only stations without extended information",
"schema": {
"type": "boolean"
}
},
{
"name": "is_https",
"in": "query",
"description": "Not set=display all, true=show only stations which have https url, false=show only stations that do stream unencrypted with http",
"schema": {
"type": "boolean"
}
},
{
"name": "order",
"in": "query",
"description": "Name of the attribute the result list will be sorted by",
"schema": {
"type": "string",
"enum": [
"name",
"url",
"homepage",
"favicon",
"tags",
"country",
"state",
"language",
"votes",
"codec",
"bitrate",
"lastcheckok",
"lastchecktime",
"clicktimestamp",
"clickcount",
"clicktrend",
"changetimestamp",
"random"
],
"default": "name"
}
},
{
"name": "reverse",
"in": "query",
"description": "Reverse the result list if set to true",
"schema": {
"type": "boolean",
"default": "false"
}
},
{
"name": "hidebroken",
"in": "query",
"description": "Do not count broken stations",
"schema": {
"type": "boolean",
"default": "false"
}
},
{
"name": "offset",
"in": "query",
"description": "Starting value of the result list from the database. For example, if you want to do paging on the server side",
"schema": {
"type": "integer",
"format": "int32",
"default": "0"
}
},
{
"name": "limit",
"in": "query",
"description": "Number of returned datarows (stations) starting with offset",
"schema": {
"type": "integer",
"format": "int32",
"default": "100000"
}
}
],
"responses": {
"200": {
"description": "Successful operation",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "object/Station.json"
}
}
}
}
}
}
}
},
"/stations/byuuid": {
"get": {
"tags": [
"RadioBrowser"
],
"summary": "A list of radio stations that have an exact UUID match",
"operationId": "findStationsByUuid",
"parameters": [
{
"name": "uuids",
"in": "query",
"required": true,
"description": "MANDATORY, comma-separated list of UUIDs",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful operation",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "object/Station.json"
}
}
}
}
}
}
}
},
"/stations/byurl": {
"get": {
"tags": [
"RadioBrowser"
],
"summary": "A list of radio stations that have an exact URL match",
"operationId": "findStationsByUrl",
"parameters": [
{
"name": "url",
"in": "query",
"required": true,
"description": "MANDATORY, URL of the station",
"schema": {
"type": "string",
"example": "http://this.is.a.link/test.mp3"
}
}
],
"responses": {
"200": {
"description": "Successful operation",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "object/Station.json"
}
}
}
}
}
}
}
},
"/stations/topclick": {
"get": {
"tags": [
"RadioBrowser"
],
"summary": "A list of the stations that are clicked the most. You can add a parameter with the number of wanted stations",
"operationId": "findStationsTopClick",
"parameters": [
{
"$ref": "param/Filter.json#/hidebroken"
},
{
"$ref": "param/Filter.json#/offset"
},
{
"$ref": "param/Filter.json#/limit"
}
],
"responses": {
"200": {
"description": "Successful operation",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "object/Station.json"
}
}
}
}
}
}
}
},
"/stations/topvote": {
"get": {
"tags": [
"RadioBrowser"
],
"summary": "A list of the highest-voted stations. You can add a parameter with the number of wanted stations",
"operationId": "findStationsTopVote",
"parameters": [
{
"$ref": "param/Filter.json#/hidebroken"
},
{
"$ref": "param/Filter.json#/offset"
},
{
"$ref": "param/Filter.json#/limit"
}
],
"responses": {
"200": {
"description": "Successful operation",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "object/Station.json"
}
}
}
}
}
}
}
},
"/stations/lastclick": {
"get": {
"tags": [
"RadioBrowser"
],
"summary": "A list of stations that were clicked recently",
"operationId": "findStationsLastClick",
"parameters": [
{
"$ref": "param/Filter.json#/hidebroken"
},
{
"$ref": "param/Filter.json#/offset"
},
{
"$ref": "param/Filter.json#/limit"
}
],
"responses": {
"200": {
"description": "Successful operation",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "object/Station.json"
}
}
}
}
}
}
}
},
"/stations/lastchange": {
"get": {
"tags": [
"RadioBrowser"
],
"summary": "A list of stations that were added or changed recently",
"operationId": "findStationsLastChange",
"parameters": [
{
"$ref": "param/Filter.json#/hidebroken"
},
{
"$ref": "param/Filter.json#/offset"
},
{
"$ref": "param/Filter.json#/limit"
}
],
"responses": {
"200": {
"description": "Successful operation",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "object/Station.json"
}
}
}
}
}
}
}
},
"/url/{uuid}": {
"get": {
"tags": [
"RadioBrowser"
],
"summary": "Increase the click count of a station by one. This should be called everytime when a user starts playing a stream to mark the stream more popular than others. Every call to this endpoint from the same IP address and for the same station only gets counted once per day. The call will return detailed information about the stream",
"operationId": "clickStation",
"parameters": [
{
"name": "uuid",
"in": "path",
"description": "UUID of the station",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "result/ClickStationResult.json"
}
}
}
}
}
}
},
"/stations/vote/{uuid}": {
"get": {
"tags": [
"RadioBrowser"
],
"summary": "Increase the vote count for the station by one. Can only be done by the same IP address for one station every 10 minutes. If it works, the changed station will be returned as result",
"operationId": "voteForStation",
"parameters": [
{
"name": "uuid",
"in": "path",
"description": "UUID of the station",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "result/Result.json"
}
}
}
}
}
}
},
"/add": {
"post": {
"tags": [
"RadioBrowser"
],
"summary": "Add a radio station to the database",
"operationId": "addStation",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "object/NewStation.json"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "result/AddStationResult.json"
}
}
}
}
}
}
},
"/stats": {
"get": {
"tags": [
"RadioBrowser"
],
"summary": "Web service stats",
"operationId": "getServerStats",
"responses": {
"200": {
"description": "Successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "object/ServerStats.json"
}
}
}
}
}
}
},
"/servers": {
"get": {
"tags": [
"RadioBrowser"
],
"summary": "A list of server mirrors. A DNS look-up of all.api.radio-browser.info is performed followed by a reverse one for every result getting from the first request. This should be done on the client. ONLY USE THIS if your client is not able to do DNS look-ups",
"operationId": "getServerMirrors",
"responses": {
"200": {
"description": "Successful operation",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "object/ServerMirror.json"
}
}
}
}
}
}
}
},
"/config": {
"get": {
"tags": [
"RadioBrowser"
],
"summary": "The current active server config",
"operationId": "getServerConfig",
"responses": {
"200": {
"description": "Successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "object/ServerConfig.json"
}
}
}
}
}
}
}
}
}