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
andproviderResourceId
name
– the content namecontentType
– 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
andtvshow
.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
andproviderResourceId
(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 formatend*
– resource end date in ISO 8601 formatprofileIdSet
– a semicolon-separated list of profile IDsstaging
– 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
andproviderResourceId
seriesRef
– the series that the content belongs to.- This is either:
id
– the ID of the series content group, or- Both
providerId
andproviderResourceId
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
, orrelpath: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-specificmetadata
blocks, each of which has:locale*
– the locale for themetadata
element. If locale is set to none, themetadata
block that it applies to is the default – it is the one that is used if there is nometadata
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 flagFileSize
– 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
andproviderResourceId
(the resource ID of the content group)
metadataSet*
– a set of locale-specificmetadata
blocks, each of which has:locale*
– the locale for themetadata
element. If locale is set to none, themetadata
block that it applies to is the default – it is the one that is used if there is nometadata
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 titleSynopsis
* – synopsis of the contentDescription*
– description of the contentDuration
* – the content's durationCategories
* – the categories that the content belongs toSeasonNumber*
– 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 ratioDefinition
– the content's definition (e.g.,HD
)AudioMode
– the content's audio mode (e.g.,5.1
)IsRecordable
– whether recording is enabled for the contentYear
– the content's release yearCountries
– countriesRating
– 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 thefilteringList
is an allowed list or not (true
orfalse
).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
orfalse
)
parentalRatings*
– one or more blocks specifying parental ratings for the content. Each block contains:ratingBodyName*
– the name of the rating bodycontentRatingCode*
– the rating codecountryCode*
– 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
istrue
orfalse
.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:
{
"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.