Skip to main content
Skip table of contents

Creating an editorial content

Request

To create an editorial content (that is, a VOD item), send a POST request to:

https://<host>:<port>/metadata/content/v1/editorialContents/

Headers

  • Content-Type: application/json

Mandatory arguments

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

  • Either:
    • id – the ID of the editorial content, or
    • Both providerId and providerResourceId
  • name – the content name
  • contentType – the content's type. Valid values are as follows (note that the value is case-sensitive):

    • movie
    • trailer
    • tvshow
    • episode
    • match
    • race
    • highlight
    • music
    • podcast
    • news
    • link
    • short-form
    • unknown

    For ION, the only valid values are movie and tvshow.

  • contentGroupRef – specifies the content group that the content belongs to. This is usually a series, a season, or a movie group. contentGroupRef is a block that contains either:
    • id – the ID of the content group, or
    • Both providerId and providerResourceId (the resource ID of the content group)

Other arguments

The following arguments (all in the request body) are all optional.

However, they may be required by ION (if you are using it). These are indicated with an asterisk (*).

  • start* – resource start date in ISO 8601 format

  • end* – resource end date in ISO 8601 format
  • profileIdSet – a semicolon-separated list of profile IDs 
  • staging – whether the content is in the staging area or not (true or false)
  • seasonRef – the season that the content belongs to. This is either:
    • id – the ID of the season content group, or
    • Both providerId and providerResourceId
  • seriesRef – the series that the content belongs to.
  • This is either:
    • id – the ID of the series content group, or
    • Both providerId and providerResourceId
  • referenceAssetSet – the content's reference asset(s). A block defining one or more reference assets, each one containing:
    • uri* – an ID using either the schema "id" (e.g., id:de305d54-75b4) or a path relative to the ADL using the schema "relpath" (e.g., relpath://folder/, relpath://folder/mib.m3u8, or relpath:mib.m3u8).
    • type * – the asset type (e.g., SD or HD)
    • assetDeviceLocation – the asset device location (ADL) is a set of data that describes the asset location on a specific storage device. ADL type must be unique per asset. If an ADL with the specified type does not exist, it will be created. Otherwise, it will be updated. This consists of one or more blocks, each of which contains:
      • relativePath – the path (e.g., folder/ or ./folder1/folder2/) relative to the storage device access point. It can be empty.
      • storageDeviceId – the ID of the storage device where the asset is located. This storage device will be accessed through one of its access points.
      • type – the storage device type. Must be one of:
        • source
        • destination
        • archive
        • other
    • metadataSet – a set of locale-specific metadata blocks, each of which has:
      • locale* – the locale for the metadata element. If locale is set to none, the metadata block that it applies to is the default – it is the one that is used if there is no metadata block for the user's locale.
      • metadata – a block containing one or more key/value pairs in the following form:
        [{
        "key": "<key_name>",
        "value": "<value>"
        }]

        You can add whatever keys you require. However, the following values have significance in OpenTV Platform:

        • CMS4MigratedData – CMS4 migrated data flag
        • FileSize – file size (string)
        • FrameDuration – frame duration (string)
        • Comment – comment
  • contentGroupRefSet – specifies the content group that the content belongs to. This is usually a series, a season, or a movie group. contentGroupRef is a block that contains either:
    • id – the ID of the content group, or
    • Both providerId and providerResourceId (the resource ID of the content group)
  • metadataSet* – a set of locale-specific metadata blocks, each of which has:
    • locale* – the locale for the metadata element. If locale is set to none, the metadata block that it applies to is the default – it is the one that is used if there is no metadata block for the user's locale.
    • metadata* – a block containing one or more key/value pairs in the following form:
      [{
      "key": "<key_name>",
      "value": "<value>"
      }]

      You can add whatever keys you require. However, the following values have significance in OpenTV Platform:

      • Title * – the content title
      • Synopsis * – synopsis of the content
      • Description* – description of the content
      • Duration * – the content's duration
      • Categories * – the categories that the content belongs to
      • SeasonNumber* – the number of the season that the content belongs to (only if it is a TV show that belongs to a season)
      • episodeNumber * – the number of the episode in the season (only if it is a TV show that belongs to a season)
      • Aspect – the content's aspect ratio
      • Definition – the content's definition (e.g., HD)
      • AudioMode – the content's audio mode (e.g., 5.1)
      • IsRecordable – whether recording is enabled for the content
      • Year – the content's release year
      • Countries – countries
      • Rating – the content's rating (score)
      • contentType – the content's type, if not a movie or a trailer (e.g., News)
      • filteringList – a list of countries (IOS codes) for geo-filtering. Values must be comma-separated.
      • filteringIsAllowList – indicates if the filteringList is an allowed list or not (true or false).
      • blockingList – a list of countries where playback is allowed. Values must be comma-separated.
      • blockIfOffNet – whether filtering of content for on/off network is enabled (true or false)
  • parentalRatings* – one or more blocks specifying parental ratings for the content. Each block contains:
    • ratingBodyName* – the name of the rating body
    • contentRatingCode* – the rating code
    • countryCode* – the country code
  • clientControls – specifies the capability products that are enabled/disabled for the content (for example, the ability to fast-forward or rewind). This is a block containing one or more key/value pairs in the following form:

    CODE
    [{
       "key": "<key_name>",
       "value": true|false
    }]

    Here:

    • key_name is the name of a capability that has been configured in Platform.

    • value is true or false. true means that the product is enabled for the content. false means it is disabled.

Example

A POST request with this payload creates a new editorial content:

CODE
{
    "id": "9462470",
    "name": "Fishing Impossible/S02/E07/Cornwall/9462470",
    "providerId": "OPERATOR",
    "providerResourceId": "9462470",
    "contentType": "movie",
    "contentGroupRef": {
        "providerId": "OPERATOR",
        "providerResourceId": "SER284052"
    },
    "metadataSet": [{
            "locale": "en_AU",
            "metadata": [{
                    "key": "Title",
                    "value": "Fishing Impossible"
                },
                {
                    "key": "Synopsis",
                    "value": ""
                },
                {
                    "key": "Description",
                    "value": "The Fishing Impossible team are in Cornwall on the trail of beautiful blue sharks."
                },
                {
                    "key": "Episode",
                    "value": "Cornwall"
                },
                {
                    "key": "CUST_SortTitle",
                    "value": "fishing impossible"
                }
            ]
        },
        {
            "locale": "none",
            "metadata": [{
                    "key": "Rating",
                    "value": "PG+"
                },
                {
                    "key": "DvbCategories",
                    "value": "0:0:8:D+"
                },
                {
                    "key": "Categories",
                    "value": "TV SHOWS - DOCUMENTARY"
                },
                {
                    "key": "Year",
                    "value": "2017"
                },
                {
                    "key": "Countries",
                    "value": "GB"
                },
                {
                    "key": "ContentType",
                    "value": "TV_EPS"
                },
                {
                    "key": "CUST_SeasonNumber",
                    "value": "2"
                },
                {
                    "key": "EpisodeNumber",
                    "value": "7"
                }
            ]
        }
    ],
    "parentalRatings": [{
        "ratingBodyName": "Australian Classifications",
        "contentRatingCode": "MA15+",
        "countryCode": "AUS"
    }]
}

Response

A successful request returns an HTTP 201 status. The response body contains the URI of the newly-created editorial content

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.

JavaScript errors detected

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

If this problem persists, please contact our support.