Request
To create a content group, send a POST request to:
https://<host>:<port>/metadata/content/v1/contentGroups/
Ingesting a content group does not associate any content with it. To associate content with the content group, see Ingesting content group links.
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
providerIdandproviderResourceId
-
-
type– the content group type. Valid values are as follows (note that the value is case-sensitive):-
series -
season -
movieGroup -
collection -
channel
-
Other arguments
-
name– the content group’s name -
start– resource start date in ISO 8601 format -
end– resource end date in ISO 8601 format -
subType– a sub-category of content group (any value permitted) -
contentLinkId– a property that links similar content metadata from multiple content providers -
parentRef– the ID of the parent content group (for example of the series if this content group is a season). It must be either:-
id– the ID of the editorial content, or -
Both
providerIdandproviderResourceId
-
-
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
-
-
orderingFields– if one or more fields are specified here, they determine the order in which content groups are returned in GET operations. -
publishToEndUserDevices– whether the content group should be published to end users (trueorfalse). -
metadataSet* – a set of locale-specificmetadatablocks, each of which has:-
locale* – the locale for themetadataelement. If locale is set to none, themetadatablock that it applies to is the default – it is the one that is used if there is nometadatablock for the user's locale. -
metadata* – a block containing one or more key/value pairs in the following form:JSON[{ "key": "<key_name>", "value": "<value>" }]You can add whatever keys you require. However, the following values have significance in OpenTV Platform:
-
Title– the content group title -
SeasonNumber– season number. Mandatory if thecontentGroup typeis set toseason. -
recommendable– whether the content group should be included in recommendations from the recommendation engine. Default:true. Must be in the"locale": "none"block.
-
-
The following fields are set internally by CPM and should not be used in this request:
-
creationDate -
lastModificationDate -
self -
statusPerExportSet -
preferenceSet -
lastContentAdded
Example
A POST request with this payload creates a new content group:
{
"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 content group.
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.