Retrieve the rail structure for a template
Description
This API returns the IDs and properties of all the rails for the requested template, without any related data. This is faster and the response payload is smaller than retrieving the rails and all their contents.
The client would then typically use this information to decide which rails to retrieve, then retrieve those rails individually.
Request
To retrieve all the rails for a particular template, send a GET request to:
https://server:port/contentdelivery/v1/templatesummary/{templateid|templatename}
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 it is required that at least one rail has been added to a layout and at least one rail item has been added to the rail.
Headers
Authorization: Bearer
– bearer tokenContent-Type: application/json
Nagra-Target
– the device type (e.g.,TV
)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.
An unsuccessful request returns an HTTP 500 status if there was a problem with the request.
Example
{
"name": "westerns",
"title": "Yee Haw!",
"properties": {
"background-image": "/IM/cowboy_background.jpg"
},
"targets": [
"ios",
"Android"
],
"rails": [
{
"name": "best",
"title": "Best of Westerns",
"layout": "landscape",
"properties": {
"play-trailers-on-hover": "true"
},
"sections": [
{
"type": "ContentItem",
"properties": {
"size": "promoted"
},
"content": [
{
"type": "editorial",
"id": "GLOBAL_gbu",
"Title": "The Good, the Bad and the Ugly"
}
]
},
{
"type": "ChannelItem",
"contents": [
{
"id": "CHANNEL_ID",
"channel": {},
"currentEvent": {
"id": "EVENT_ID_1"
},
"events": [
{
"id": "EVENT_ID_1"
},
{
"id": "EVENT_ID_N"
}
]
}
]
},
{
"type": "NodeItem",
"properties": {
"size": "standard"
},
"content": [
{
"type": "editorial",
"id": "GLOBAL_ffd",
"Title": "A Fistful of Dollars"
},
{
"type": "editorial",
"id": "GLOBAL_ffdm",
"Title": "For a Few Dollars More"
},
{
"type": "editorial",
"id": "GLOBAL_u",
"Title": "The Unforgiven"
},
{
"type": "editorial",
"id": "GLOBAL_ncfom",
"Title": "No Country for Old Men"
}
]
},
{
"type": "PreCuratedItem",
"properties": {
"size": "jumbo"
},
"source": "AMCO",
"content": [
{
"type": "editorial",
"id": "GLOBAL_tc",
"Title": "Thundercats",
"images": [
{
"name": "medium_16_9",
"aspectRatio": "16:9",
"height": 480,
"width": 720,
"uri": "https://m.media-amazon.com/images/M/MV5BMjJhNjMzNzYtMzIwYy00OGQ5LWE0NWMtNWJkNWE3NmMwNDJkL2ltYWdlL2ltYWdlXkEyXkFqcGdeQXVyNDUxNjc5NjY@._V1_.jpg"
}
],
"links": [
{
"provider": "AMCO",
"type": "vod",
"action": "direct",
"uri": "https://amco.com/thundercats_ho!"
}
]
}
]
}
]
}
]
}
See also
For full details of this API, see the Content Delivery API documentation.