Skip to main content
Skip table of contents

Retrieving previous/now/next programmes – pre-defined queries

Using pre-defined queries

To retrieve previous, now and next information for a given channel or all channels, use the pre-defined 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 the current programme for all channels

  • Get previous, now and next programme

  • Get previous, now and next programme for a specific channel

  • Pagination over channels

Request

To retrieve current events, either for all for specific channels channels, or previous, now and next programmes, send a GET request to:

CODE
https://<host>:<port>/<endpoint>/metadata/epg/now

Headers

  • Authorization: Bearer – bearer token
  • Content-Type: application/json

Mandatory arguments

None

Other arguments

All these arguments are query parameters:

  • ltcu – the lower bound (time) from which we want programmes either specified in ISO8601 format, or as a time offset (e.g. +08:00 or -08:00)
  • stcu – the upper bound (time) to which we want programmes either specified in ISO8601 format, or as a time offset (e.g. +08:00 or -08:00)
  • channel – a specific channel ID
  • next – whether to show next programme in listing
  • previous – whether to show previous programme in listing
  • fields – a list of fields names to return in the response
  • page – the page of results to retrieve
  • limit – the page size
  • Accept-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.

Examples

Retrieves the previous, now and next programme for all channels:

CODE
https://<host>:<port>metadata/epg/now?next=true&previous=true


Get previous, now and next programme for a specific channel:

CODE
https://<host>:<port>/metadata/epg/now?next=true&previous=true&channel=GLOBAL_bbc_one


Pagination over channels – takes page 2 of size 10, (channels 11-20 inclusive):

CODE
https://<host>:<port>/metadata/epg/now?limit=10&page=2

See also

The Content discovery facade API documentation


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.