Skip to main content
Skip table of contents

Retrieve the rail structure for a template

Overview

This endpoint returns the IDs and properties of all the rails for the requested template, without the rail contents.

The client then typically uses this information to decide which rails to retrieve, then retrieves those rails individually.

Request

To retrieve the rail structure for a particular template, send a GET request to:

BASH
https://server:port/contentdelivery/v1/templatesummary/{templateId|templateName}

Headers

  • Authorization: Bearer – bearer token

  • Content-Type: application/json

  • Nagra-Target – the destination (e.g., TV). The rails that are returned may be filtered on the head end according to the destination.

  • Nagra-Device-Type – the device type (e.g., Android or iOS). This determines the technicals that are are returned in rails responses.

  • Accept-Language – the locale (e.g., en_GB)

Mandatory arguments

  • {templateId|templateName} – the client must pass either a template ID or a template name (both are unique) to retrieve the specific template’s rail IDs and properties.

Response

A successful request returns an HTTP 200 status. The response includes a list of templates and the number of templates.

A bad request returns an HTTP 400 status.

See Template responses for information about how to handle the response.

The response includes a cache-control header that specifies a max-age.

The client must respect this. That is, it:

  • Should not repeat the same request until the time specified in max-age has passed.

  • Should refresh the data by making another request if the time specified in max-age has passed.

See Caching best practices for more details.

Note that the rails may be filtered on the head end (for example, according to age ratings, entitlements, or other rules).

This means that not all the rails that have been added to a template may be included in the response that the client receives.

Example

JSON
{
  "name": "westerns",
  "title": "Yee Haw!",
  "targets": [
    "ios",
    "Android"
  ],
  "properties": {
    "background-image": "/IM/cowboy_background.jpg"
  },
  "rails": [
    {
      "blueprintId": "",
      "name": "best",
      "title": "Best of Westerns",
      "layout": "landscape",
      "properties": {
        "play-trailers-on-hover": "true"
      },
      "sections": [],
      "hasNext": null,
      "id": "c06abe53-08a6-4f56-b5bb-69249f7f815b"
    }
  ]
}

See also

For full details of this API, see the Content Delivery API documentation.

JavaScript errors detected

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

If this problem persists, please contact our support.