Skip to main content
Skip table of contents

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's contentGroupRef 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 and providerResourceId
  • name – the name of the content group 
  • type – the content group type, one of:
    • series 
    • season 
    • movieGroup 
    • collection
    • channel

    When type is season , the content group's seasonNumber must have a value. (seasonNumber is defined in metadataSet.)

    When type is channel, the content group can only be linked to a product of type subscription.

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 format
  • end* – the resource end date in ISO 8601 format
  • subType* – operator-defined sub-category
  • parentRef – reference to the parent content group. This is either:
    • id – the ID of the content group, or
    • Both providerId and providerResourceId
  • 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 and providerResourceId
  • orderingFields* – the field(s) by which the items in the content group should be ordered in a query response.
  • 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 group title
      • seriesNumber* – description of the event
      • Rating – the rating for the content group
      • recommendable – 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:

CODE
{
   "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.

JavaScript errors detected

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

If this problem persists, please contact our support.