Creating a content group
Request
To create a content group (for example, a series, a season, a group of channels, or an arbitrary group of content or other content groups), send a POST request to:
https://<host>:<port>/metadata/content/v1/contentGroups
A content group does not include details of the content that it includes. To add content to a content group, either:
- Create a content group link to associate resources (editorial contents, editorial channels, or other content groups) with the content group.
See Creating a content group link. - Specify the content group in the content itself.
For example, to include an editorial content in a content group, specify the content group in the content'scontentGroupRef
element.
See Creating an editorial content.
Headers
Content-Type: application/json
Mandatory arguments
All of the following are in the request body:
- Either:
id
– the ID of the content group, or- Both
providerId
andproviderResourceId
name
– the name of the content grouptype
– the content group type, one of:series
season
movieGroup
collection
channel
When
type
isseason
, the content group'sseasonNumber
must have a value. (seasonNumber
is defined inmetadataSet
.)When
type
ischannel
, the content group can only be linked to a product of typesubscription
.
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*
– the resource start date in ISO 8601 formatend
*
– the resource end date in ISO 8601 formatsubType*
– operator-defined sub-categoryparentRef
– reference to the parent content group. This is either:id
– the ID of the content group, or- Both
providerId
andproviderResourceId
preferenceSet*
– reference to the editorial contents and/or content groups that should be returned first in queries. This (short) list is curated by the operator. All the items included here should belong to this content group. This element contains one or more blocks, each of which contains either:id
– the ID of the editorial content/content group, or- Both
providerId
andproviderResourceId
orderingFields*
– the field(s) by which the items in the content group should be ordered in a query response.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 group titleseriesNumber
* – description of the eventRating
– the rating for the content grouprecommendable
– whether the series/season should be included in recommendations from the recommendation engine. Default:true
. Only relevant for series and seasons. Must be in the"locale": "none"
block.
Example
A POST request with this payload creates a new season content group:
{
"id": "SER284052",
"providerId": "Operator",
"providerResourceId": "SER284052",
"name": "Fishing Impossible/284052",
"type": "season",
"metadataSet": [{
"locale": "en_AU",
"metadata": [{
"key": "Title",
"value": "Fishing Impossible"
}]
},
{
"locale": "none",
"metadata": [{
"key": "Rating",
"value": "0"
},
{
"key": "SeasonNumber",
"value": "10"
}]
}]
}
Response
A successful request returns an HTTP 201 status. The response body contains the URI of the new 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.