Skip to main content
Skip table of contents

Retrieve a specific rail and its contents

Overview

This endpoint retrieves the details of a particular rail and its contents.

For details on how to interpret the rail response, see Interpreting template hierarchy, template, and rails responses.

Request

To retrieve the details of the specified rail and its related contents, send a GET request to

CODE
https://server:port/contentdelivery/v1/templateviews/{templateId/templateName}/rails/{railId}

There is a v2 version of this endpoint that includes entitlement badging, that is, an indication for each content about whether the user has an entitlement to play it or not.

See GET /contentdelivery/v2/templateviews/badges/{templateIdOrName}/rails/{railId} in the Content Delivery API documentation.

This allows the client app to indicate whether a content can be played or whether the user needs to purchase a product first to be able to do so.

However, the responses from this endpoint cannot be cached, which means the client will have to make more requests, which may affect performance.

Headers

  • Authorization: Bearer – bearer token

  • Content-Type: application/json

  • 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 rails and their content (in URL).

  • railId – the ID of the rail for which to retrieve content (in URL)

Other arguments

These arguments are all query parameters:

  • limit – the number of records to return

  • page – the page number to return (cannot be used without limit)
    For example:

    • ?limit=10 returns the first 10 records.

    • ?limit=10&page=2 returns the second 10 records.

  • offset – the number of records to skip

Response

A successful request returns an HTTP 200 status. The response includes the contents of the specified rail.

A bad request returns an HTTP 400 status.

See Rail reponses for details of how to read the response and render the rail.

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 content within the rail / rail section may be filtered on the head end (for example, according to age ratings, entitlements, or other rules).

This means that not all the items that have been added to a rail / rail section may be included in the response that the client receives.

Example

JSON
{
  "name": "First Rail",
  "title": "Home",
  "layout": "portrait",
  "properties": {
    "secret": "sssshh!"
  },
  "sections": [
    {
      "type": "ContentItem",
      "properties": {
        "secret": "sssshh!"
      },
      "source": "string",
      "contents": [
        {
          "type": "editorial",
          "id": "GLOBAL_star_wars",
          "title": "Star Wars",
          "Actors": [
            "Harrison Ford"
          ],
          "rating": {
            "code": "string",
            "precedence": "string",
            "title": "string"
          },
          "ratings": [
            {
              "code": "string",
              "precedence": "string",
              "title": "string"
            }
          ],
          "duration": 120,
          "description": "Space action",
          "synopsis": "Space action",
          "categories": [
            "Space",
            "Action"
          ],
          "seriesRef": "string",
          "tmsId": "GLOBAL_star_wars",
          "contentType": "movie",
          "seasonNumber": 0,
          "episodeNumber": 0,
          "episode": 0,
          "year": 0,
          "images": [
            {
              "name": "small_16_9",
              "aspectRatio": "string",
              "height": 0,
              "width": 0,
              "uri": "string",
              "hints": [
                "string"
              ]
            }
          ],
          "technicals": [
            {
              "id": "string",
              "isSTCU": true,
              "isLTCU": true,
              "media": {
                "AV_PlaylistName": {
                  "frameDuration": 0,
                  "format": "string",
                  "id": "string",
                  "fileName": "string"
                }
              },
              "deviceType": "string",
              "promoImages": [
                "string"
              ],
              "prducts": {
                "id": "string",
                "startPurchase": "string",
                "endValidity": "string",
                "startValidity": "string",
                "rentalDuration": 0,
                "price": {
                  "startPurchase": 0,
                  "endPurchase": "string",
                  "currency": "string",
                  "value": 0
                },
                "platformRef": "string",
                "endPurchase": 0,
                "impulsive": true,
                "regions": [
                  "string"
                ],
                "title": "string",
                "type": "string"
              }
            }
          ],
          "links": [
            {
              "provider": "Netflix",
              "type": "string",
              "action": "string",
              "url": "https://netflix.com/abc/xyz"
            }
          ]
        },
        {
          "type": "programme",
          "editorial": {
            "type": "editorial",
            "id": "GLOBAL_star_wars",
            "title": "Star Wars",
            "Title": "Star Wars",
            "Actors": [
              "Harrison Ford"
            ],
            "rating": {
              "code": "string",
              "precedence": "string",
              "title": "string"
            },
            "ratings": [
              {
                "code": "string",
                "precedence": "string",
                "title": "string"
              }
            ],
            "duration": 120,
            "Description": "Space action",
            "Synopsis": "Space action",
            "Categories": [
              "Space",
              "Action"
            ],
            "seriesRef": "string",
            "Directors": [
              "string"
            ],
            "Producers": [
              "string"
            ],
            "TmsId": "GLOBAL_star_wars",
            "contentType": "movie",
            "SeasonNumber": 0,
            "episodeNumber": 0,
            "Episode": "string",
            "year": 0,
            "Images": [
              "string"
            ],
            "technicals": [
              {
                "id": "string",
                "media": {
                  "AV_PlaylistName": {
                    "id": "string",
                    "fileName": "string",
                    "drmId": "string",
                    "drmInstanceName": "string",
                    "format": "string",
                    "uri": "string"
                  }
                },
                "isSTCU": true,
                "isLTCU": true,
                "guardTimeStart": "string",
                "guardTimeEnd": "string",
                "cUStartDate": 0,
                "cUEndDate": 0
              }
            ],
            "position": 0,
            "sportType": "string",
            "ltcuRepresentationOfStcu": true,
            "PromoImages": [
              "string"
            ],
            "nodeRefs": [
              "string"
            ],
            "DisplayPriority": {
              "additionalProp1": "string",
              "additionalProp2": "string",
              "additionalProp3": "string"
            },
            "InHomeBlockingRequired": true,
            "CUStartDate": 0,
            "CUEndDate": 0,
            "period": {
              "duration": 0,
              "start": 0,
              "end": 0
            }
          },
          "id": "string",
          "title": "string",
          "contentRef": "string",
          "rating": {
            "code": "string",
            "precedence": "string",
            "title": "string"
          },
          "ratings": [
            {
              "code": "string",
              "precedence": "string",
              "title": "string"
            }
          ],
          "periodStart": "string",
          "periodEnd": "string",
          "airingStartTime": 0,
          "airingEndTime": 0,
          "promoImages": [
            "string"
          ],
          "serviceRef": "string",
          "tmsId": "string",
          "isnPvr": "string",
          "isStartOver": true,
          "isCatchUp": true,
          "categories": [
            "string"
          ],
          "drmId": "string",
          "contentType": "string",
          "seasonNumber": 0,
          "episodeNumber": 0,
          "episode": 0,
          "synopsis": "string",
          "seriesRef": "string",
          "images": [
            {
              "name": "small_16_9",
              "aspectRatio": "string",
              "height": 0,
              "width": 0,
              "uri": "string",
              "hints": [
                "string"
              ]
            }
          ],
          "technicals": [
            {
              "id": "string",
              "isSTCU": true,
              "isLTCU": true,
              "media": {
                "AV_PlaylistName": {
                  "frameDuration": 0,
                  "format": "string",
                  "id": "string",
                  "fileName": "string"
                }
              },
              "deviceType": "string",
              "promoImages": [
                "string"
              ],
              "prducts": {
                "id": "string",
                "startPurchase": "string",
                "endValidity": "string",
                "startValidity": "string",
                "rentalDuration": 0,
                "price": {
                  "startPurchase": 0,
                  "endPurchase": "string",
                  "currency": "string",
                  "value": 0
                },
                "platformRef": "string",
                "endPurchase": 0,
                "impulsive": true,
                "regions": [
                  "string"
                ],
                "title": "string",
                "type": "string"
              }
            }
          ]
        },
        {
          "btvServices": {
            "id": "string",
            "locale": "en_GB",
            "isFreemium": true,
            "deviceType": [
              "ION"
            ],
            "editorial": {
              "id": "string",
              "period": {
                "duration": 0,
                "start": 0,
                "end": 0
              }
            },
            "technical": {
              "id": "string",
              "period": {
                "duration": 0,
                "start": 0,
                "end": 0
              },
              "catchUpSupport": true,
              "startOverSupport": true,
              "title": "string",
              "shortName": "string",
              "longName": "string",
              "description": "string"
            }
          },
          "btvProgramme": {
            "type": "programme",
            "editorial": {
              "type": "editorial",
              "id": "GLOBAL_star_wars",
              "title": "Star Wars",
              "Title": "Star Wars",
              "Actors": [
                "Harrison Ford"
              ],
              "rating": {
                "code": "string",
                "precedence": "string",
                "title": "string"
              },
              "ratings": [
                {
                  "code": "string",
                  "precedence": "string",
                  "title": "string"
                }
              ],
              "duration": 120,
              "Description": "Space action",
              "Synopsis": "Space action",
              "Categories": [
                "Space",
                "Action"
              ],
              "seriesRef": "string",
              "Directors": [
                "string"
              ],
              "Producers": [
                "string"
              ],
              "TmsId": "GLOBAL_star_wars",
              "contentType": "movie",
              "SeasonNumber": 0,
              "episodeNumber": 0,
              "Episode": "string",
              "year": 0,
              "Images": [
                "string"
              ],
              "technicals": [
                {
                  "id": "string",
                  "media": {
                    "AV_PlaylistName": {
                      "id": "string",
                      "fileName": "string",
                      "drmId": "string",
                      "drmInstanceName": "string",
                      "format": "string",
                      "uri": "string"
                    }
                  },
                  "isSTCU": true,
                  "isLTCU": true,
                  "guardTimeStart": "string",
                  "guardTimeEnd": "string",
                  "cUStartDate": 0,
                  "cUEndDate": 0
                }
              ],
              "position": 0,
              "sportType": "string",
              "ltcuRepresentationOfStcu": true,
              "PromoImages": [
                "string"
              ],
              "nodeRefs": [
                "string"
              ],
              "DisplayPriority": {
                "additionalProp1": "string",
                "additionalProp2": "string",
                "additionalProp3": "string"
              },
              "InHomeBlockingRequired": true,
              "CUStartDate": 0,
              "CUEndDate": 0,
              "period": {
                "duration": 0,
                "start": 0,
                "end": 0
              }
            },
            "id": "string",
            "title": "string",
            "contentRef": "string",
            "rating": {
              "code": "string",
              "precedence": "string",
              "title": "string"
            },
            "ratings": [
              {
                "code": "string",
                "precedence": "string",
                "title": "string"
              }
            ],
            "periodStart": "string",
            "periodEnd": "string",
            "airingStartTime": 0,
            "airingEndTime": 0,
            "promoImages": [
              "string"
            ],
            "serviceRef": "string",
            "tmsId": "string",
            "isnPvr": "string",
            "isStartOver": true,
            "isCatchUp": true,
            "categories": [
              "string"
            ],
            "drmId": "string",
            "contentType": "string",
            "seasonNumber": 0,
            "episodeNumber": 0,
            "episode": 0,
            "synopsis": "string",
            "seriesRef": "string",
            "images": [
              {
                "name": "small_16_9",
                "aspectRatio": "string",
                "height": 0,
                "width": 0,
                "uri": "string",
                "hints": [
                  "string"
                ]
              }
            ],
            "technicals": [
              {
                "id": "string",
                "isSTCU": true,
                "isLTCU": true,
                "media": {
                  "AV_PlaylistName": {
                    "frameDuration": 0,
                    "format": "string",
                    "id": "string",
                    "fileName": "string"
                  }
                },
                "deviceType": "string",
                "promoImages": [
                  "string"
                ],
                "prducts": {
                  "id": "string",
                  "startPurchase": "string",
                  "endValidity": "string",
                  "startValidity": "string",
                  "rentalDuration": 0,
                  "price": {
                    "startPurchase": 0,
                    "endPurchase": "string",
                    "currency": "string",
                    "value": 0
                  },
                  "platformRef": "string",
                  "endPurchase": 0,
                  "impulsive": true,
                  "regions": [
                    "string"
                  ],
                  "title": "string",
                  "type": "string"
                }
              }
            ]
          }
        },
        {
          "id": "string",
          "contentType": "NonContent",
          "index": 0
        },
        null
      ],
      "size": 5
    }
  ]

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.