-
Notifications
You must be signed in to change notification settings - Fork 3
/
openapi.yaml
977 lines (960 loc) · 27.1 KB
/
openapi.yaml
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
openapi: "3.0.1"
info:
version: 1.0.0
title: Universal Media Server API
description: API Endpoint used by Universal Media Server's core application to retrieve media metadata
contact:
name: Universal Media Server forums
url: https://www.universalmediaserver.com/forum/
servers:
- url: https://api.universalmediaserver.com
paths:
/:
get:
description: |
Returns the current health status of the API
responses:
'200':
description: Successful health status response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/subversions:
get:
description: |
Returns the current API subversions in use. This can be used by API consumers to purge a cached metadata document if a new endpoint subversion has been released (with bugfixes or enhancements)
responses:
'200':
description: API subversions
content:
application/json:
schema:
$ref: '#/components/schemas/Subversions'
/api/configuration:
get:
description: |
Returns the current configuration that an API consumer should use to fetch referenced resources, such as current baseurls for thumbnail images
responses:
'200':
description: Configuration values in use
content:
application/json:
schema:
$ref: '#/components/schemas/Configuration'
/api/media/title:
get:
description: |
Returns media metadata by title
parameters:
- in: query
name: title
description: Title of the media file
schema:
type: string
example: The Matrix Reloaded
required: true
- in: query
name: year
description: Release year of the media. Providing this parameter increases result accuracy.
schema:
type: string
example: 2003
responses:
'200':
description: Media metadata
content:
application/json:
schema:
$ref: '#/components/schemas/MediaMetadata'
'404':
description: Metadata not found
content:
application/json:
schema:
$ref: '#/components/schemas/MetadataNotFoundError'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/RequestValidationError'
'503':
description: Service unavailable
content:
application/json:
schema:
$ref: '#/components/schemas/DependencyError'
/api/media/v2/title:
get:
description: |
Returns media metadata by title
parameters:
- in: query
name: title
description: Title of the media file
schema:
type: string
example: The Matrix Reloaded
required: true
- in: query
name: episode
description: Episode number, if media is a tv series episode
schema:
type: string
example: 8
- in: query
name: season
description: Season number, if media is a tv series
schema:
type: string
example: 1
- in: query
name: year
description: Release year of the media. Providing this parameter increases result accuracy.
schema:
type: string
example: 2003
responses:
'200':
description: Media metadata
content:
application/json:
schema:
$ref: '#/components/schemas/MediaMetadata'
'404':
description: Metadata not found
content:
application/json:
schema:
$ref: '#/components/schemas/MetadataNotFoundError'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/RequestValidationError'
'503':
description: Service unavailable
content:
application/json:
schema:
$ref: '#/components/schemas/DependencyError'
/api/media/imdbid:
get:
description: |
Returns series metadata by title or imbdID
parameters:
- in: query
name: imdbid
description: imdb.com id
schema:
type: string
example: tt0455275
required: true
responses:
'200':
description: Series metadata
content:
application/json:
schema:
$ref: '#/components/schemas/MediaMetadata'
'404':
description: Metadata not found
content:
application/json:
schema:
$ref: '#/components/schemas/MetadataNotFoundError'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/RequestValidationError'
'503':
description: Service unavailable
content:
application/json:
schema:
$ref: '#/components/schemas/DependencyError'
/api/media/seriestitle:
get:
description: |
Returns series metadata by title or imbdID
parameters:
- in: query
name: title
description: Title of the series
schema:
type: string
example: Prison Break
- in: query
name: year
description: Release year of the media. Providing this parameter increases result accuracy.
schema:
type: string
example: 2005
- in: query
name: imdbID
description: imdb.com id
schema:
type: string
example: tt0455275
responses:
'200':
description: Series metadata
content:
application/json:
schema:
$ref: '#/components/schemas/SeriesMetadata'
'404':
description: Metadata not found
content:
application/json:
schema:
$ref: '#/components/schemas/MetadataNotFoundError'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/RequestValidationError'
'503':
description: Service unavailable
content:
application/json:
schema:
$ref: '#/components/schemas/DependencyError'
/api/media/video:
get:
description: |
Returns media metadata
parameters:
- in: query
name: title
description: Title of the media file
schema:
type: string
example: The Matrix Reloaded
- in: query
name: year
description: Release year of the media. Providing this parameter increases result accuracy.
schema:
type: string
example: 2003
- in: query
name: osdbHash
description: osdbHash of the media file
schema:
type: string
example: 0f0f4c9f3416e24f
- in: query
name: imdbID
description: imdbID of the media file
schema:
type: string
example: tt0816692
- in: query
name: episode
description: episode number of the media file
schema:
type: string
example: 3
- in: query
name: season
description: season number of the media file
schema:
type: string
example: 1
- in: query
name: filebytesize
description: filebytesize of the media file
schema:
type: string
example: 2431697820
responses:
'200':
description: Media metadata
content:
application/json:
schema:
$ref: '#/components/schemas/MediaMetadata'
'404':
description: Metadata not found
content:
application/json:
schema:
$ref: '#/components/schemas/MetadataNotFoundError'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/RequestValidationError'
'503':
description: Service unavailable
content:
application/json:
schema:
$ref: '#/components/schemas/DependencyError'
/api/media/season:
get:
description: |
Returns season metadata
parameters:
- in: query
name: title
description: Title of the tv series
schema:
type: string
example: The Simpsons
required: true
- in: query
name: season
description: Season of the tv series
schema:
type: string
example: 1
required: true
- in: query
name: year
description: Year of the season aired
schema:
type: string
example: 1989
responses:
'200':
description: Media metadata
content:
application/json:
schema:
$ref: '#/components/schemas/SeasonMetadata'
'404':
description: Metadata not found
content:
application/json:
schema:
$ref: '#/components/schemas/MetadataNotFoundError'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/RequestValidationError'
'503':
description: Service unavailable
content:
application/json:
schema:
$ref: '#/components/schemas/DependencyError'
components:
schemas:
Status:
type: object
properties:
status:
type: string
example: OK
Subversions:
type: object
properties:
configuration:
type: string
example: "1"
season:
type: string
example: "1"
series:
type: string
example: "1"
video:
type: string
example: "1"
Configuration:
type: object
properties:
imageBaseURL:
type: string
ExternalIds:
type: array
items:
type: object
properties:
imdb_id:
type: string
example: tt0455275
freebase_mid:
type: string
example: /m/0cmqz_
freebase_id:
type: string
example: /en/the_simpsons_season_1
tvdb_id:
type: number
example: 2727
tvrage_id:
type: string
facebook_id:
type: string
example: PrisonBreak
instagram_id:
type: string
example: prisonbreak
twitter_id:
type: string
example: PrisonBreak
SeasonMetadata:
type: object
properties:
_id:
type: string
example: 61c4fe6cdda2797a73f2bb86
airDate:
type: string
format: date
example: 1989-12-17
credits:
$ref: '#/components/schemas/Credits'
externalIDs:
$ref: '#/components/schemas/ExternalIds'
genres:
type: array
items:
type: string
example: Action
images:
type: array
items:
type: string
example: Action
tmdbID:
type: string
example: 3582
revenue:
type: string
example: 701729206
seasonNumner:
type: number
example: 1
name:
type: string
example: Season 1
createdAt:
type: string
format: date-time
example: 2021-12-16T07:10:24.066Z
updatedAt:
type: string
format: date-time
example: 2021-12-16T07:10:24.066Z
MediaMetadata:
type: object
properties:
_id:
type: string
example: 6178aa67dda2797a734dfbb3
actors:
type: array
items:
type: string
example: Keanu Reeves
awards:
type: string
example: 8 wins & 34 nominations
budget:
type: number
example: 165000000
boxoffice:
type: string
example: $281,576,461
country:
type: string
example: United States
credits:
$ref: '#/components/schemas/Credits'
directors:
type: array
items:
type: string
example: Lana Wachowski
externalIDs:
$ref: '#/components/schemas/ExternalIds'
genres:
type: array
items:
type: string
example: Action
images:
type: array
items:
type: string
example: Action
imdbID:
type: string
example: tt0234215
metascore:
type: string
example: tt0234215
productionCompanies:
type: array
items:
type: string
example: Action
productionCountries:
type: array
items:
type: string
example: Action
plot:
type: string
example: In this second adventure, Neo and the rebel leaders estimate that they have 72 hours until Zion falls under siege to the Machine Army. Only a matter of hours separates the last human enclave on Earth from 250,000 Sentinels programmed to destroy mankind. But the citizens of Zion, emboldened by Morpheus conviction that the One will fulfill the Oracles Prophecy and end the war with the Machines, rest all manner of hope and expectation on Neo, who finds himself stalled by disturbing visions as he searches for a course of action.
poster:
type: string
example: https://m.media-amazon.com/images/M/MV5BODE0MzZhZTgtYzkwYi00YmI5LThlZWYtOWRmNWE5ODk0NzMxXkEyXkFqcGdeQXVyNjU0OTQ0OTY@._V1_SX300.jpg
posterRelativePath:
type: string
example: /gEU2QniE6E77NI6lCU6MxlNBvIx.jpg
rated:
type: string
example: R
rating:
type: number
example: 7.2
ratings:
type: array
items:
type: object
properties:
Source:
type: string
example: Internet Movie Database
Value:
type: string
example: 7.2/10
released:
type: string
format: date-time
example: 2003-05-15T00:00:00.000Z
revenue:
type: string
example: 701729206
runtime:
type: string
example: 138 min
title:
type: string
example: The Matrix Reloaded
type:
type: string
example: movie
votes:
type: string
example: 544,956
year:
type: string
example: 2003
updatedAt:
type: string
format: date-time
example: 2021-12-16T07:10:24.066Z
Credits:
type: array
items:
type: object
properties:
cast:
type: array
items:
type: object
properties:
adult:
type: boolean
example: false
gender:
type: number
example: 2
id:
type: number
example: 3972
known_for_department:
type: string
example: Acting
name:
type: string
example: Wentworth Miller
original_name:
type: string
example: Wentworth Miller
popularity:
type: number
example: 5.008
profile_path:
type: string
example: /1apvr7onOG9OuGjQqlBytBEEY1n.jpg
character:
type: string
example: Michael Scofield
credit_id:
type: string
example: 52572f15760ee3776a320742
order:
type: number
example: 0
crew:
type: array
items:
type: object
SeriesMetadata:
type: object
properties:
_id:
type: string
example: 617b774450f42c1b646b9ee9
actors:
type: array
items:
type: string
example: Dominic Purcell
awards:
type: string
example: Nominated for 1 Primetime Emmy. 8 wins & 32 nominations total
country:
type: string
example: United Kingdom, United States
createdBy:
type: array
items:
type: object
properties:
id:
type: number
example: 54869
credit_id:
type: string
example: 52572f17760ee3776a320b04
name:
type: string
example: Paul Scheuring
gender:
type: number
example: 2
profile_path:
type: string
credits:
$ref: '#/components/schemas/Credits'
directors:
type: array
items:
type: string
example: Lana Wachowski
externalIDs:
$ref: '#/components/schemas/ExternalIds'
genres:
type: array
items:
type: string
example: Action & Adventure
homepage:
type: string
example: http://www.fox.com/prisonbreak
images:
$ref: '#/components/schemas/Images'
imdbID:
type: string
example: tt0455275
inProduction:
type: boolean
example: true
languages:
type: array
items:
type: string
example: en
lastAirDate:
type: string
example: 2017-05-30
networks:
type: array
items:
type: object
properties:
name:
type: string
example: FOX
id:
type: number
example: 19
logo_path:
type: string
example: /1DSpHrWyOORkL9N2QHX7Adt31mQ.png
origin_country:
type: string
example: US
numberOfEpisodes:
type: number
example: 88
originCountry:
type: array
items:
type: string
example: US
originalLanguage:
type: string
example: en
plot:
type: string
example: Due to a political conspiracy, an innocent man is sent to death row and his only hope is his brother, who makes it his mission to deliberately get himself sent to the same prison in order to break the both of them out, from the inside out.
poster:
type: string
example: https://m.media-amazon.com/images/M/MV5BMTg3NTkwNzAxOF5BMl5BanBnXkFtZTcwMjM1NjI5MQ@@._V1_SX300.jpg
posterRelativePath:
type: string
example: /5E1BhkCgjLBlqx557Z5yzcN0i88.jpg
productionCompanies:
type: array
items:
type: object
properties:
id:
type: number
example: 33423
logo_path:
type: string
example: /6HRO4RN1sz9Ts2hu2FhHRhDtbar.pn
name:
type: string
example: Cartoon Network
origin_country:
type: string
example: US
productionCountries:
type: array
items:
type: object
properties:
id:
type: number
example: 90836
logo_path:
type: string
name:
type: string
example: Prison Break Productions
origin_country:
type: string
rated:
type: string
example: TV-14
rating:
type: number
example: 8.3
ratings:
type: array
items:
type: object
properties:
_id:
type: string
example: 6179105ace4e504b5734b674
Source:
type: string
example: Internet Movie Database
Value:
type: string
example: 8.3/10
released:
type: string
format: date-time
example: 2005-08-29T00:00:00.000Z
seasons:
type: array
items:
type: object
properties:
air_date:
type: string
format: date
example: 2005-08-29
episode_count:
type: number
example: 22
id:
type: number
example: 7132
name:
type: string
example: Season 1
overview:
type: string
example: Lincoln Burrows is currently on death row and scheduled to die in a few months for an assassination his younger brother Michael is convinced he did not commit. With no other options and time winding down, Michael takes drastic measures to get himself incarcerated alongside his brother in Fox River State Penitentiary. Once he's inside, Michael, a structural engineer with the blueprints for the prison, begins to execute an elaborate plan to break Lincoln out and prove him innocent.
poster_path:
type: string
example: /jnMW2qcOjgwsjHx6QkOIeXShsLi.jpg
season_number:
type: number
example: 1
seriesType:
type: string
example: Scripted
spokenLanguages:
type: array
items:
type: object
properties:
english_name:
type: string
example: English
iso_639_1:
type: string
example: en
name:
type: string
example: English
startYear:
type: string
example: 2005
status:
type: string
example: Ended
tagline:
type: string
example: Break in. Break out. Save your brother's life.
title:
type: string
example: Prison Break
tmdbID:
type: string
example: 2288
description: Series id on https://www.themoviedb.org/
totalSeasons:
type: number
example: 5
type:
type: string
example: series
votes:
type: string
example: 500,009
year:
type: string
example: 2005
createdAt:
type: string
format: date-time
example: 2021-10-27T08:39:54.757Z
updatedAt:
type: string
format: date-time
example: 2021-10-27T08:39:54.757Z
Images:
type: array
items:
type: object
properties:
backdrops:
type: array
items:
type: object
properties:
aspect_ratio:
type: number
example: 1.777
height:
type: number
example: 1294
iso_639_1:
type: string
example: en
file_path:
type: string
example: /92OPBZpLc82y8CzOtrQ8P9RDvIN.jpg
vote_average:
type: number
example: 5.322,
vote_count:
type: number
example: 5
width:
type: number
example: 2300
logos:
type: array
items:
type: object
properties:
aspect_ratio:
type: number
example: 1.777
height:
type: number
example: 1294
iso_639_1:
type: string
example: en
file_path:
type: string
example: /92OPBZpLc82y8CzOtrQ8P9RDvIN.jpg
vote_average:
type: number
example: 5.322,
vote_count:
type: number
example: 5
width:
type: number
example: 2300
posters:
type: array
items:
type: object
properties:
aspect_ratio:
type: number
example: 0.667
height:
type: number
example: 3000
iso_639_1:
type: string
example: en
file_path:
type: string
example: /a4H0UR7aUkGZlT6Q9r9grBrjJWR.jpg
vote_average:
type: number
example: 5.384
vote_count:
type: number
example: 2
width:
type: number
example: 2000
Error:
type: object
required:
- code
- message
properties:
code:
type: integer
format: int32
message:
type: string
DependencyError:
type: object
properties:
error:
type: string
example: TMDB API is offline
MetadataNotFoundError:
type: object
properties:
error:
type: string
example: Metadata not found.
RequestValidationError:
type: object
properties:
error:
type: string
example: title or imdbId is a required parameter