Creating a channel group
Request
To create a channel group, send a POST request to:
https://<host>:<port>/metadata/content/v1/contentGroups
A channel group is a type of content group.
A channel group does not include details of the channels that it includes. To add channels to a channel group, create a content group link to associate the editorial channels with the channel (content) group.
See Creating a content group link.
Headers
Content-Type: application/json
Mandatory arguments
All of the following are in the request body:
- Either:
id
– the ID of the channel group, or- Both
providerId
andproviderResourceId
name
– the name of the channel grouptype
– the content group type, which in this case must bechannel
.For content groups of type
channel
, 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 channel 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 channel group
Example
A POST request with this payload creates a new channel group:
{
"providerId": "Operator",
"providerResourceId": "CG017",
"name": "Channel group 17",
"type": "channel"
}
Response
A successful request returns an HTTP 201 status. The response body contains the URI of the new channel 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.