swagger: '2.0' info: version: '2.0' title: TV API description: Welcome to the API Reference Docs page for the Press Association TV API (v2). host: tv.api.press.net basePath: /v2 securityDefinitions: apikey: type: apiKey name: apikey in: header schemes: - https - http produces: - application/json paths: /platform: get: description: Return a list of available platforms. summary: Platform Collection tags: - Platform operationId: listPlatforms security: - apikey: [] produces: - application/json parameters: - $ref: '#/parameters/Aliases' responses: 200: description: '' schema: type: object examples: application/json: |- { "limit": 30, "items": [ { "id": "2254c5d8-1f7a-3741-96a8-12349f7a612e", "title": "BT TV", "subject": [ { "code": "platform:patv:11", "profile": "platform" } ] }, { "id": "d46f4b85-b5e8-3639-a767-faa082df415f", "title": "Freesat", "subject": [ { "code": "platform:patv:4", "profile": "platform" } ] }, { "id": "992e72d4-86a4-3644-bd0f-fb742a0e9f5d", "title": "Freeview", "subject": [ { "code": "platform:patv:3", "profile": "platform" } ] }, { "id": "5d3eb87e-410a-3ef1-b465-64a4d196d126", "title": "International", "subject": [ { "code": "platform:patv:14", "profile": "platform" } ] }, { "id": "4ac6f1a6-83d4-3116-865b-3ab212b00eb5", "title": "Irish Radio", "subject": [ { "code": "platform:patv:13", "profile": "platform" } ] }, { "id": "cd5a54da-d1ec-3e36-8593-93b5e92ebc01", "title": "Saorsat", "subject": [ { "code": "platform:patv:9", "profile": "platform" } ] }, { "id": "8173de5c-7005-3f92-9de9-432e656731fd", "title": "Saorview", "subject": [ { "code": "platform:patv:8", "profile": "platform" } ] }, { "id": "87eb02d1-cdef-344a-8823-106d2dc8097b", "title": "Sky HD", "subject": [ { "code": "platform:patv:1", "profile": "platform" } ] }, { "id": "236f1da3-6901-3539-93ed-a56c4cc6a7f4", "title": "Sky SD", "subject": [ { "code": "platform:patv:2", "profile": "platform" } ] }, { "id": "04124b1d-3836-3bfb-89e7-ef696de8c155", "title": "TalkTalk YouView", "subject": [ { "code": "platform:patv:12", "profile": "platform" } ] }, { "id": "0ffc504c-2d24-3bdb-9877-69c1da228f59", "title": "Virgin", "subject": [ { "code": "platform:patv:5", "profile": "platform" } ] }, { "id": "78d67520-a6b5-3827-a242-fb91448e3668", "title": "Virgin Media Ireland", "subject": [ { "code": "platform:patv:7", "profile": "platform" } ] }, { "id": "a004c401-250f-3d87-8692-cf1de5b9d62c", "title": "YouView", "subject": [ { "code": "platform:patv:10", "profile": "platform" } ] } ] } /platform/{platformId}: get: description: Return the content of the selected platform. summary: Platform Detail tags: - Platform operationId: getPlatform security: - apikey: [] produces: - application/json parameters: - $ref: '#/parameters/PlatformId' in: path responses: 200: description: '' schema: type: object examples: application/json: |- { "id": "87eb02d1-cdef-344a-8823-106d2dc8097b", "title": "Sky HD", "subject": [ { "code": "platform:patv:1", "profile": "platform" } ] } /platform/{platformId}/region: get: description: Return a list of regions for a platform. summary: Platform Region Collection tags: - Platform operationId: listPlatformRegions security: - apikey: [] produces: - application/json parameters: - $ref: '#/parameters/PlatformId' in: path - $ref: '#/parameters/Aliases' responses: 200: description: '' schema: type: object examples: application/json: |- { "limit": 5, "items": [ { "id": "8e0c3099-fe15-352b-9f78-c4f72276826a", "title": "Anglia", "subject": [ { "code": "region:patv:1", "profile": "region" } ] }, { "id": "da7fc2a3-acf1-31c5-947a-af1f61c1890c", "title": "Cambridgeshire", "subject": [ { "code": "region:patv:2", "profile": "region" } ] }, { "id": "9bb1d3c0-67c0-3d38-b554-bedefe958497", "title": "Channel Islands", "subject": [ { "code": "region:patv:3", "profile": "region" } ] }, { "id": "ead8fbf9-51fe-390c-bf8a-b3c0c006d572", "title": "Cumbria", "subject": [ { "code": "region:patv:4", "profile": "region" } ] }, { "id": "2e7d06bc-5bcc-3500-9fa0-bf3f65f214c2", "title": "East Midlands", "subject": [ { "code": "region:patv:5", "profile": "region" } ] } ] } /channel: get: description: Return a collection of channels. summary: Channel Collection tags: - Channel operationId: listChannels security: - apikey: [] produces: - application/json parameters: - $ref: '#/parameters/PlatformId' - $ref: '#/parameters/RegionId' - $ref: '#/parameters/Aliases' - $ref: '#/parameters/Date' description: "Date of the Channel State to select, this will display channel names and attributes in the future or past." responses: 200: description: '' schema: type: object examples: application/json: |- { "total": 3, "item": [{ "id": "04fcb8ba-c11d-5e7b-a8e3-390358e312b2", "title": "BBC News Channel", "epg": "570", "attribute": [], "meta": { "live-stream": "http://www.bbc.co.uk/tv/bbcnews/live" }, "category": [{ "code": "news", "name": "News" }], "subject": [{ "code": "channel:patv:85", "profile": "channel" }, { "code": "channel:youview:33511", "profile": "channel" } ] }, { "id": "031eb8fd-1ab5-5184-b9ec-14a888208d24", "title": "BBC News Channel HD", "epg": "503", "attribute": [ "hd" ], "meta": { "live-stream": "http://www.bbc.co.uk/tv/bbcnews/live" }, "category": [{ "code": "news", "name": "News" }], "subject": [{ "code": "channel:patv:1853", "profile": "channel" }, { "code": "channel:youview:12257552", "profile": "channel" } ] }, { "id": "d2fa92ae-5756-5e7f-a3ce-a7fe35c844b9", "title": "BBC One Cambridgeshire", "epg": "962", "attribute": [ "regional" ], "meta": { "live-stream": "http://www.bbc.co.uk/tv/bbcone/live" }, "category": [{ "code": "entertainment", "name": "Entertainment" }], "subject": [{ "code": "channel:youview:1127", "profile": "channel" }, { "code": "channel:patv:1664", "profile": "channel" } ] } ] } /channel/{channelId}: get: description: Return the content of the selected channel. summary: Channel Detail tags: - Channel operationId: getChannel security: - apikey: [] produces: - application/json parameters: - $ref: '#/parameters/ChannelId' in: path - $ref: '#/parameters/Aliases' responses: 200: description: '' schema: type: object examples: application/json: |- { "id": "031eb8fd-1ab5-5184-b9ec-14a888208d24", "title": "BBC News Channel HD", "epg": "503", "attribute": [ "hd" ], "meta": { "live-stream": "http://www.bbc.co.uk/tv/bbcnews/live" }, "category": [{ "code": "news", "name": "News" }], "subject": [{ "code": "channel:patv:1853", "profile": "channel" }, { "code": "channel:youview:12257552", "profile": "channel" } ] } /asset: get: description: Return a collection of Assets. summary: Asset Collection tags: - Asset operationId: listAssets security: - apikey: [] produces: - application/json parameters: - $ref: '#/parameters/After' - $ref: '#/parameters/UpdatedSince' - $ref: '#/parameters/Limit' - $ref: '#/parameters/Aliases' responses: 200: description: '' schema: type: object examples: application/json: |- { "limit": "2", "hasNext": true, "item": [{ "id": "18dfef24-8b3c-5bd2-9971-1c4ae8b4bc91", "type": "episode", "certification": {}, "meta": {}, "category": [{ "code": "music-ballet-dance", "name": "Music/Ballet/Dance" }, { "code": "music-ballet-dance:general", "name": "General", "dvb": "6000" } ], "attribute": [], "summary": { "short": "Music and chat", "medium": "Music and chat. Including at 4.30 Pause for Thought", "long": "Music and chat, featuring guests and news. Including at 4.30 Pause for Thought" }, "related": [{ "type": "series", "id": "979d1804-26c3-5ea5-aea7-c2650b3daaaa", "title": "Richard Allinson" }], "subject": [{ "code": "programme:patv:1269818", "profile": "asset" }] }, { "id": "bce802e4-089d-5737-9c8a-3edd30a0775e", "type": "episode", "certification": {}, "meta": {}, "category": [{ "code": "music-ballet-dance", "name": "Music/Ballet/Dance" }, { "code": "music-ballet-dance:general", "name": "General", "dvb": "6000" } ], "attribute": [], "summary": { "short": "Music and chat", "medium": "Music and chat. Including at 4.30 Pause for Thought", "long": "Music and chat, featuring guests and news. Including at 4.30 Pause for Thought" }, "related": [{ "type": "series", "id": "979d1804-26c3-5ea5-aea7-c2650b3daaaa", "title": "Richard Allinson" }], "subject": [{ "code": "programme:patv:1269940", "profile": "asset" }] } ] } /asset/{assetId}: get: description: Return the content of the selected asset. summary: Asset Detail tags: - Asset operationId: getAsset security: - apikey: [] produces: - application/json parameters: - $ref: '#/parameters/AssetId' in: path required: true - $ref: '#/parameters/Aliases' responses: 200: description: '' schema: type: object examples: application/json: |- { "id": "61d40145-3e28-3a4a-8d53-650310505927", "title": "2 Fast 2 Furious", "type": "movie", "productionYear": 2003, "number": 1, "certification": { "bbfc": "12" }, "meta": { "url": "http://www.bbc.co.uk/tv/bbcnews/live" }, "category": [{ "code": "sport", "name": "Sport", "dvb": "1F03" }, { "code": "sport:golf", "name": "Golf", "dvb": "1F05" } ], "attribute": [ "welsh" ], "summary": { "short": "Thriller sequel, starring Paul Walker.", "medium": "A disgraced cop is given a chance to redeem himself by going undercover to bring a drug trafficker to justice. Thriller sequel, with Paul Walker, Tyrese Gibson and Eva Mendes.", "long": "A disgraced former cop is arrested by the FBI for illegal street racing, but his one-time colleagues offer him freedom in exchange for going on an undercover mission. Teaming up with an old racing friend and a customs official, he has to infiltrate and bring down a drug-trafficking operation. Thriller sequel, with Paul Walker reprising his role from The Fast and the Furious alongside Tyrese Gibson, Eva Mendes and Cole Hauser." }, "related": [{ "id": "61d40145-3e28-3a4a-8d53-650310505927", "title": "Game of Thrones", "type": "series", "subject": [{ "code": "series:patv:2312", "profile": "asset" }] }, { "id": "61d40145-3e28-3a4a-8d53-650310505927", "title": "Game of Thrones Season 2", "type": "season", "number": 2, "subject": [{ "code": "season:patv:42332", "profile": "asset" }] } ], "subject": [{ "code": "programme:patv:552426", "profile": "asset" }] } parameters: Accept: name: Accept in: header required: false type: string enum: - application/json description: The response format. default: application/json Query: name: query in: query required: false type: string description: Search string to query the objects and return matching results. Limit: name: limit in: query required: false type: integer format: int32 default: 100 description: >- Limit the the number of items to be returned per page. For example: 5. The 'limit' parameter is typically used with the 'offset' parameter to facilitate pagination. Offset: name: offset in: query required: false type: integer format: int32 description: >- The page offset of the first item to be returned. For example: 2. The 'offset' parameter is typically used with the 'limit' parameter to facilitate pagination. PlatformId: name: platformId in: query required: true type: string default: d3b26caa-8c7d-5f97-9eff-40fcf1a6f8d3 description: The identifier for the selected platform. Multiple platforms can be passed to the API without a region Id. Passing multiple platforms without a region will not return epg numbers as these are linked to a platform and region. RegionId: name: regionId in: query required: true type: string default: afa4f624-da9b-54ce-b514-570345dbbdce description: The platform region ID for the channel selection. ChannelId: name: channelId in: query required: true type: string description: The identifier for the selected channel. Date: name: start in: query required: false default: 2015-05-05 type: string description: "Example Date" UpdatedSince: name: updatedSince in: query required: false default: '2015-05-05T00:00:00' type: string description: "Updated Since" AssetId: name: assetId in: query required: false type: string description: A asset ID filter for the schedule collection. This can be a reference to any type of asset i.e. movie, season, series or episode. After: name: after in: query required: false type: string default: cfab77d4-5d98-42fc-b7d9-40271e420f72 description: The Id of the entity you would like to page after. ContributorId: name: contributorId in: query required: false type: string description: Filter the schedule items by contributor ID Type: name: type in: query required: false default: movie type: string description: Type filter for the assets.i.e episode, movie, season or series Tag: name: tag in: query required: false default: genre:comedy type: string description: Tag filter for the assets ContributorType: name: type in: query required: false type: string description: Type filter for the assets. i.e. cast, director or producer FeatureId: name: featureId in: query required: true type: string description: The identifier for the selected feature. Aliases: name: aliases in: query required: false type: boolean default: true description: Flag to display Legacy and Provider Ids.