Skip to main content
Skip table of contents

Retrieve a specific rail and its contents

Description

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

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}

Preconditions

The operator should have created the templates and their layouts. They also need to schedule templates for the current time to be able to retrieve this list. If a template doesn’t have a scheduled layout for the current time the API won’t be able to retrieve it.

To be able to see contents, the operator must have added a rail to a layout and at least one rail item to the rail.

Headers

  • Authorization: Bearer – bearer token

  • Content-Type: application/json

  • Nagra-Target – the destination (e.g., TV). This determines the template layout that is returned. (A layout can have a destination of of tv, mobile, tablet, and/or desktop, or all of these.)

  • 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)

Response

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

An unsuccessful request returns an HTTP 500 status if there was a problem with the request.

Details of promotional banners (size, image, action if clicked, and so on) are delivered as key/value pairs (properties) on the rail/section containing the banner.

Example

CODE
{
  "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.