Skip to main content
Skip table of contents

Template responses

Overview

This page explains the fields that are returned when you make a request to Retrieve the rail structure for a template.

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 response

A template response looks like this.

Note that only one rail is shown to save space.

JSON
{
  "name": "OPERATOR1-OD-HOME",
  "title": "HOME",
  "targets": [],
  "properties": {
    "screenId": "1",
    "icon": "icon_menu_home_focused",
    "routeName": "discover"
  },
  "rails": [
    {
      "blueprintId": "a2b21c00-0741-4b70-b1ce-c7b327788026",
      "configurationProperties": {
        "client_context": [
          "double height",
          "alternating",
          "2x3 hero"
        ],
        "hero_tile_repeat": true,
        "edge_peek": true,
        "instance": "Hero Magazine 2",
        "layout_style": "dual_row_hero_grid",
        "visible": true,
        "grid_tile_pattern": [
          "4x3",
          "16x9"
        ],
        "type": "magazine_strip",
        "scroll_type": "infinite_scroll",
        "grid_tile_pattern_invert": true,
        "hero_tile_aspect_ratio": "2x3",
        "tile_style": "default",
        "spanned_row_navigation": "directional",
        "max_pages": 0,
        "show_more": false
      },
      "name": "DISCOVER",
      "title": "DISCOVER",
      "layout": "Landscape",
      "properties": {
        "ui_layout": "magazine_1"
      },
      "sections": [],
      "hasNext": null,
      "id": "0b3003b3-e3b8-4115-a7a9-6713848dc676"
    },
    ...
  ]
}

Fields

The fields and blocks that are included in a template response are as follows:

Field

Description

Meaning/actions

name

The template name (same as in the template hierarchy, above)

The client should display this as the title of the page if title is null.

title

The template title

If title is not null, the client should use this as the title of the page.

targets

The target destination(s) for the layout

If this is an empty array, it applies to all destinations.

You do not need to do anything with targets – the layout that is returned will always be the correct one for the client’s destination type.

properties

Additional properties that have been set for the layout

(That is, for the version of the template that is appropriate for the client, based on device type, etc.)

Such properties may be used, for example, to tell the client that a particular template/page should be styled in a particular way.

rails

The rails that the layout includes

The fields here are the same as in Rail reponses, except for the sections block, which never populated here.

The only field that you need here is each rail’s id.

Use these rail IDs to get the individual rails and their contents (see Retrieve a specific rail and its contents).

Follow the Rails best practices:

  • Do not get more rails than you need to.

  • Use paging to get only as much content as you need for each rail.

JavaScript errors detected

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

If this problem persists, please contact our support.