OpenTV ENTera & OpenTV Platform Documentation

Ingesting a trailer link

Request

To create one or more trailer links, that is, links between editorial contents of type trailer and the corresponding editorial contents (for example, of type movie), send a PUT request to:

Bash
https://<host>:<port>/metadata/content/v1/trailerLinks/

Headers

  • Content-Type: application/json

Mandatory arguments

All of the following arguments are part of the request body:

  • A trailerLinkSet containing one or more of the following pairs of elements:

    • trailerRef – the ID of the editorial content of type trailer. This is either:

      • id – the ID of the node, or

      • Both providerId and providerResourceId

    • promotableRef – the content to which the trailer is to be linked. It contains:

      • Either:

        • id – the ID of the content, or

        • Both providerId and providerResourceId

      • type – the content type. It can only have a value of editorialContent.

Other arguments

  • priorityOrder – the priority of this trailer in relation to other trailers for the same content (integer, lowest value is highest priority)

Example

A PUT request with this payload creates two new trailer link between two trailers and the same editorial content, with priority order set on each to specify that the first has higher priority:

JSON
{
  "trailerLinkSet": [
    {
      "trailerRef": {
        "id": "12162590"
      },
      "promotableRef": {
        "id": "55959494",
        "type": "editorialContent"
      },
      "priorityOrder": 0
    },
    {
      "trailerRef": {
        "id": "12162591"
      },
      "promotableRef": {
        "id": "55959494",
        "type": "editorialContent"
      },
      "priorityOrder": 1
    }
  ]
}

Response

A successful request returns an HTTP 200 status. The response body contains the URI of the newly-created trailer link.

A bad request returns an HTTP 400 status.

See also

For full details of this API, see Content and Product Manager (CPM) API documentation: content v1.