forked from xJREB/openapi-maintainability-benchmark
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bbc-iplayer.yaml
2072 lines (2071 loc) · 53.8 KB
/
bbc-iplayer.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
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.0
servers:
- url: 'https://ibl.api.bbci.co.uk/ibl/v1'
- url: 'http://ibl.api.bbci.co.uk/ibl/v1'
info:
contact:
email: [email protected]
name: Open iBL Project
url: 'http://developer.bbc.co.uk/'
description: The definitive iPlayer API.
license:
name: MIT
url: 'https://opensource.org/licenses/MIT'
title: BBC iPlayer Business Layer
version: '1.0'
externalDocs:
description: BBC iPlayer documentation
url: 'http://smethur.st/posts/176135860'
security:
- api_key: []
paths:
'/atoz/{letter}/programmes':
get:
description: Get the Programmes whose title begins with the given initial character.
operationId: Get_Programmes AtoZ search_
parameters:
- description: 'Letter to search by, a to z or the string ''0-9'''
in: path
name: letter
required: true
schema:
pattern: '[a-z](0-9)'
type: string
- $ref: '#/components/parameters/rights'
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
- $ref: '#/components/parameters/initial_child_count'
- description: The sort order of the results.
in: query
name: sort
required: true
schema:
enum:
- title
type: string
- $ref: '#/components/parameters/sort_direction'
- $ref: '#/components/parameters/availability'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ibl'
description: Default response
security: []
summary: Programmes by initial title character
tags:
- A to Z
/categories:
get:
description: Get the list of all the categories in TV & iPlayer.
operationId: Get_Categories_
parameters:
- $ref: '#/components/parameters/lang'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ibl'
description: Default response
security: []
summary: Get categories
tags:
- Categories
'/categories/{category}':
get:
description: Get sub-categories
operationId: Get_Sub-categories_
parameters:
- $ref: '#/components/parameters/category'
- $ref: '#/components/parameters/lang'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ibl'
description: Default response
security: []
summary: Get sub-categories
tags:
- Categories
'/categories/{category}/episodes':
get:
description: Get the list of all the episodes for a given category in TV & iPlayer.
operationId: Get_Episodes by category_
parameters:
- $ref: '#/components/parameters/category'
- $ref: '#/components/parameters/lang'
- $ref: '#/components/parameters/rights'
- $ref: '#/components/parameters/availability'
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
- description: The sort order of the results.
in: query
name: sort
required: false
schema:
enum:
- recent
- popular
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ibl'
description: Default response
security: []
summary: List all the episodes for a category.
tags:
- Episodes
'/categories/{category}/highlights':
get:
description: Get the editorial highlights of a given category in TV & iPlayer.
operationId: Get_Highlights by category_
parameters:
- $ref: '#/components/parameters/category'
- $ref: '#/components/parameters/lang'
- $ref: '#/components/parameters/rights'
- $ref: '#/components/parameters/availability'
- $ref: '#/components/parameters/mixin'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ibl'
description: Default response
security: []
summary: List the highlights for a category.
tags:
- Programmes (TLEOs)
'/categories/{category}/programmes':
get:
description: Get the list of all the Programmes (TLEOs) for a given category in TV & iPlayer.
operationId: Get_Programmes by category_
parameters:
- $ref: '#/components/parameters/category'
- $ref: '#/components/parameters/lang'
- $ref: '#/components/parameters/rights'
- $ref: '#/components/parameters/availability'
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ibl'
description: Default response
security: []
summary: List all the programmes for a category.
tags:
- Programmes (TLEOs)
/channels:
get:
description: Get the list of all the channels TV & iPlayer.
operationId: Get_Channels_
parameters:
- description: The region to get the channels for.
in: query
name: region
required: false
schema:
type: string
- $ref: '#/components/parameters/lang'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ibl'
description: Default response
security: []
summary: List all the channels.
tags:
- Channels
'/channels/{channel}/broadcasts':
get:
description: Get broadcasts by channel
operationId: Get_Broadcasts by channel_
parameters:
- $ref: '#/components/parameters/channel'
- $ref: '#/components/parameters/lang'
- $ref: '#/components/parameters/rights'
- $ref: '#/components/parameters/availability'
- $ref: '#/components/parameters/mixin'
- $ref: '#/components/parameters/per_page'
- description: 'Time to return results from, e.g. -3h'
in: query
name: from
required: false
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ibl'
description: Default response
security: []
summary: Get broadcasts by channel
tags:
- Programmes (TLEOs)
'/channels/{channel}/highlights':
get:
description: Get the editorial highlights of a given channel in TV & iPlayer.
operationId: Get_Highlights by channel_
parameters:
- $ref: '#/components/parameters/channel'
- $ref: '#/components/parameters/lang'
- $ref: '#/components/parameters/rights'
- $ref: '#/components/parameters/availability'
- description: Whether to include live programmes
in: query
name: live
required: false
schema:
type: boolean
- $ref: '#/components/parameters/mixin'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ibl'
description: Default response
security: []
summary: List the highlights for a channel.
tags:
- Channels
'/channels/{channel}/programmes':
get:
description: Get programmes by channel
operationId: Get_Programmes by channel_
parameters:
- $ref: '#/components/parameters/channel'
- $ref: '#/components/parameters/lang'
- $ref: '#/components/parameters/rights'
- $ref: '#/components/parameters/availability'
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ibl'
description: Default response
security: []
summary: Get programmes by channel
tags:
- Programmes (TLEOs)
'/channels/{channel}/schedule/{date}':
get:
description: Get schedule by channel
operationId: Get_Schedule by channel_
parameters:
- $ref: '#/components/parameters/channel'
- description: 'The date to return the schedule for, yyyy-mm-dd format'
in: path
name: date
required: true
schema:
type: string
- $ref: '#/components/parameters/lang'
- $ref: '#/components/parameters/rights'
- $ref: '#/components/parameters/availability'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ibl'
description: Default response
security: []
summary: Get schedule by channel
tags:
- Channels
'/clips/{pid}':
get:
description: Get Clips
operationId: Get_Clips_
parameters:
- $ref: '#/components/parameters/pid'
- $ref: '#/components/parameters/rights'
- $ref: '#/components/parameters/availability'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ibl'
description: Default response
security: []
summary: Get Clips
tags:
- Episodes
'/episodes/{pid}':
get:
description: Get the episode for a given episode identifier.
operationId: Get_Programme by PID_
parameters:
- $ref: '#/components/parameters/pid'
- $ref: '#/components/parameters/rights'
- $ref: '#/components/parameters/availability'
- $ref: '#/components/parameters/mixin'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ibl'
description: Default response
security: []
summary: Episode for a given pid.
tags:
- Episodes
'/episodes/{pid}/next':
get:
description: Get Onward Journey (next programme)
operationId: Get_Onward_Journey
parameters:
- $ref: '#/components/parameters/pid'
- $ref: '#/components/parameters/rights'
- $ref: '#/components/parameters/availability'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ibl'
description: Default response
security: []
summary: Get Onward Journey
tags:
- Episodes
'/episodes/{pid}/postrolls':
get:
description: Get Follow-ups (post-rolls)
operationId: getPostRolls
parameters:
- $ref: '#/components/parameters/pid'
- $ref: '#/components/parameters/rights'
- $ref: '#/components/parameters/availability'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ibl'
description: Default response
security: []
summary: Get Follow-ups (post-rolls)
tags:
- Episodes
'/episodes/{pid}/prerolls':
get:
description: Get Trailers (pre-rolls)
operationId: Get_Trailers (pre-rolls)_
parameters:
- $ref: '#/components/parameters/pid'
- $ref: '#/components/parameters/rights'
- $ref: '#/components/parameters/availability'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ibl'
description: Default response
security: []
summary: Get Trailers (pre-rolls)
tags:
- Episodes
'/episodes/{pid}/recommendations':
get:
description: Get programme recommendations
operationId: Get_Programme recommendations_
parameters:
- $ref: '#/components/parameters/pid'
- $ref: '#/components/parameters/rights'
- $ref: '#/components/parameters/availability'
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ibl'
description: Default response
security: []
summary: Get programme recommendations
tags:
- Episodes
/groups/popular/episodes:
get:
description: Get programmes popular
operationId: Get_Programmes popular_
parameters:
- $ref: '#/components/parameters/rights'
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
- $ref: '#/components/parameters/initial_child_count'
- $ref: '#/components/parameters/sort'
- $ref: '#/components/parameters/sort_direction'
- $ref: '#/components/parameters/availability'
- $ref: '#/components/parameters/mixin'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ibl'
description: Default response
security: []
summary: Get programmes popular
tags:
- Episodes
'/groups/{pid}/episodes':
get:
description: 'Get episodes by group, brand or series'
operationId: Get_Episodes by group_
parameters:
- $ref: '#/components/parameters/pid'
- $ref: '#/components/parameters/rights'
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
- $ref: '#/components/parameters/initial_child_count'
- $ref: '#/components/parameters/sort'
- $ref: '#/components/parameters/sort_direction'
- $ref: '#/components/parameters/availability'
- $ref: '#/components/parameters/mixin'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ibl'
description: Default response
security: []
summary: 'Get episodes by group, brand or series'
tags:
- Episodes
/home/highlights:
get:
description: Get programme highlights
operationId: Get_Programme highlights_
parameters:
- $ref: '#/components/parameters/lang'
- $ref: '#/components/parameters/rights'
- $ref: '#/components/parameters/availability'
- $ref: '#/components/parameters/mixin'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ibl'
description: Default response
security: []
summary: Get programme highlights
tags:
- Programmes (TLEOs)
'/programmes/{pid}':
get:
description: Get the programme for a given programme identifier.
operationId: Get_Programmes by parent PID_
parameters:
- $ref: '#/components/parameters/pid'
- $ref: '#/components/parameters/rights'
- $ref: '#/components/parameters/availability'
- $ref: '#/components/parameters/initial_child_count'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ibl'
description: Default response
security: []
summary: Programme for a given pid.
tags:
- Programmes (TLEOs)
'/programmes/{pid}/episodes':
get:
description: Get the child episodes belonging to a given programme identifier.
operationId: Get_Episodes by parent PID_
parameters:
- $ref: '#/components/parameters/pid'
- $ref: '#/components/parameters/rights'
- $ref: '#/components/parameters/availability'
- $ref: '#/components/parameters/initial_child_count'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ibl'
description: Default response
security: []
summary: Child episodes for a given programme pid.
tags:
- Episodes
/regions:
get:
description: Get the list of all the regions TV & iPlayer.
operationId: Get_Regions_
parameters:
- $ref: '#/components/parameters/lang'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ibl'
description: Default response
security: []
summary: List all regions
tags:
- Regions
/schema/ibl.json:
get:
description: Get schema
operationId: Get_Schema_
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ibl'
description: Default response
security: []
summary: Get schema
tags:
- Metadata
/search:
get:
description: Search
operationId: Search_
parameters:
- $ref: '#/components/parameters/q'
- $ref: '#/components/parameters/lang'
- $ref: '#/components/parameters/rights'
- $ref: '#/components/parameters/availability'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ibl'
description: Default response
security: []
summary: Search
tags:
- Search
/search-suggest:
get:
description: Search-suggest
operationId: Search-suggest_
parameters:
- $ref: '#/components/parameters/q'
- $ref: '#/components/parameters/lang'
- $ref: '#/components/parameters/rights'
- $ref: '#/components/parameters/availability'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ibl'
description: Default response
security: []
summary: Search-suggest
tags:
- Search
/status:
get:
description: 'Get the current iPlayer business layer status. This tells the caller the status of the iPlayer data, but not necessarily the overall status of the website. In the future it might include the status of the dependent data services within the BBC.'
operationId: Get_Status_
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ibl'
description: Default response
security: []
summary: Get status
tags:
- Metadata
/user/purchases:
get:
description: Get user store purchases
operationId: Get_User store purchases_
parameters:
- $ref: '#/components/parameters/identity_cookie'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ibl'
description: Default response
security:
- basic: []
summary: Get user store purchases
tags:
- User
/user/recommendations:
get:
description: Get user store recommendations
operationId: Get_User store recommendations_
parameters:
- $ref: '#/components/parameters/identity_cookie'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ibl'
description: Default response
security: []
summary: Get user store recommendations
tags:
- User
/user/watching:
get:
description: Get user watching
operationId: Get_User watching_
parameters:
- $ref: '#/components/parameters/identity_cookie'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ibl'
description: Default response
security: []
summary: Get user watching
tags:
- User
components:
parameters:
availability:
description: 'Whether to return all, or available programmes'
in: query
name: availability
required: true
schema:
default: available
enum:
- all
- available
type: string
category:
description: The category identifier to return results from.
in: path
name: category
required: true
schema:
type: string
channel:
description: The channel identifier to limit results to.
in: path
name: channel
required: true
schema:
type: string
identity_cookie:
description: The BBC-id cookie value
in: query
name: identity_cookie
required: true
schema:
format: double
type: number
initial_child_count:
description: The depth to return child entities.
in: query
name: initial_child_count
required: true
schema:
default: 4
maximum: 4
minimum: 1
type: integer
lang:
description: The language for any applicable localised strings.
in: query
name: lang
required: true
schema:
enum:
- en
- cy
- ga
- gd
- pi
type: string
mixin:
description: Request additional data in the output
explode: true
in: query
name: mixin
required: false
schema:
enum:
- live
- promotions
items:
type: string
type: array
page:
description: The page index.
in: query
name: page
required: true
schema:
format: int64
type: integer
per_page:
description: The number of results to return.
in: query
name: per_page
required: true
schema:
format: int64
type: integer
pid:
description: The programme identifier.
in: path
name: pid
required: true
schema:
minLength: 8
pattern: '^([0-9,a-d,f-h,j-n,p-t,v-z]){8,}$'
type: string
q:
description: The term to search for.
in: query
name: q
required: true
schema:
type: string
rights:
description: The rights group to limit results to.
in: query
name: rights
required: true
schema:
default: web
enum:
- mobile
- tv
- web
type: string
sort:
description: The sort order of the results.
in: query
name: sort
required: true
schema:
type: string
sort_direction:
description: Whether to sort ascending or descending
in: query
name: sort_direction
required: true
schema:
enum:
- asc
- desc
type: string
schemas:
added:
additionalProperties: false
properties:
programme:
$ref: '#/components/schemas/programme'
type:
enum:
- added
urn:
type: string
required:
- urn
- type
- programme
type: object
autoplay:
additionalProperties: false
properties:
episode:
$ref: '#/components/schemas/episode'
source:
enum:
- precs
- receng
- next
- watching
type:
enum:
- autoplay
required:
- episode
- type
- source
type: object
broadcast:
additionalProperties: false
properties:
available_on_hd_service:
nullable: true
type: string
blanked:
type: boolean
channel_title:
type: string
duration:
additionalProperties: false
properties:
text:
type: string
value:
type: string
required:
- value
- text
type: object
episode:
$ref: '#/components/schemas/episode'
episode_id:
type: string
id:
type: string
repeat:
type: boolean
scheduled_end:
type: string
scheduled_start:
type: string
service_id:
type: string
transmission_end:
type: string
transmission_start:
type: string
type:
enum:
- broadcast
version_id:
type: string
required:
- id
- type
- scheduled_start
- scheduled_end
- repeat
- blanked
- episode
- episode_id
- version_id
- service_id
type: object
category:
additionalProperties: false
properties:
child_episode_count:
type: number
child_programme_count:
type: number
contextual_title:
type: string
id:
type: string
kind:
enum:
- genre
- accessibility
- national
parent_category:
type: string
sub_categories:
items:
$ref: '#/components/schemas/category'
type: array
title:
type: string
type:
enum:
- category
required:
- id
- title
- type
- kind
type: object
channel:
additionalProperties: false
properties:
has_schedule:
type: boolean
id:
type: string
master_brand_id:
type: string
master_brand_title:
type: string
on_air:
type: boolean
title:
type: string
type:
enum:
- channel
required:
- id
- title
- type
- has_schedule
- master_brand_id
- master_brand_title
type: object
clip:
additionalProperties: false
properties:
id:
type: string
images:
additionalProperties: false
properties:
inherited_from:
type: string
standard:
type: string
type:
enum:
- image
required:
- type
- standard
type: object
labels:
additionalProperties: false
properties:
editorial:
type: string
type: object
master_brand:
$ref: '#/components/schemas/master_brand'
onward_journey:
additionalProperties: false
properties:
id:
type: string
type:
enum:
- episode
type: object
promotion_type:
enum:
- available_now
- coming_soon
synopses:
additionalProperties: false
properties:
editorial:
type: string
large:
type: string
medium:
type: string
small:
type: string
type: object
title:
type: string
tleo_id:
type: string
tleo_type:
enum:
- episode