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:
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
trailerLinkSetcontaining one or more of the following pairs of elements:-
trailerRef– the ID of the editorial content of typetrailer. This is either:-
id– the ID of the node, or -
Both
providerIdandproviderResourceId
-
-
promotableRef– the content to which the trailer is to be linked. It contains:-
Either:
-
id– the ID of the content, or -
Both
providerIdandproviderResourceId
-
-
type– the content type. It can only have a value ofeditorialContent.
-
-
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:
{
"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.