Retrieving catch-up content – predefined queries
Using pre-defined queries
To retrieve catch-up content relating to any given channel, use the predefined query API which both abstracts away the complexity of the underlying data model and provides for the most performant query.
This API allows the user to:
Get available catch-up for a specific channel (both LTCU and STCU)
Get just short-term catch-up
Get just long-term catch-up
Request
To retrieve catch-up content relating to any channel or all channels, send a GET request to:
https://<host>:<port>/<endpoint>/metadata/v1/catchup
Headers
Authorization: Bearer
– bearer tokenContent-Type: application/json
Mandatory arguments
channel
– a specific channel ID
Other arguments
All these arguments are query parameters:
stcu
– whether to include short-term catch-upltcu
– whether to include long-term catch-upfields
– a list of fields names to return in the responsepage
– the page of results to retrievelimit
– the page sizesort
– sort order of the catch-up content in the responseAccept-Language
– the language (locale) of the response data
Response
A successful request returns an HTTP 200 status.
A bad request returns an HTTP 404 status.
Example
Get available catch-up for a specific channel (both STCU and LTCU):
https://<host>:<port>/metadata/v1/catchup?channel=GLOBAL_bbc_one
Get just short-term catch-up:
https://<host>:<port>/metadata/v1/catchup?channel=GLOBAL_bbc_one&stcu=true
Get just long-term catch-up:
https://<host>:<port>/metadata/v1/catchup?channel=GLOBAL_bbc_one<cu=true
Notes:
- Only catch-up valid now is returned.
- Catch-up is returned, by default, in the order of original broadcast date descending (newest first).
- If both STCU and LTCU are present for the same content, LTCU will take precedence.