OpenTV ENTera & OpenTV Platform Documentation

Creating a content group link

To create (or update) one or more content group links (that is, to add one or more resources (editorial contents, editorial channels, or other content groups) to one or more content group), send a PUT request to:

https://<host>:<port>/metadata/content/v1/contentGroupsLinks

CPM also provides endpoints for getting and deleting content group links.

See Content and Product Manager (CPM) API documentation: content v1.

  • Content-Type: application/json

The request body consists of a contentGroupLinkSet block that contains an array of one or more objects, each of which contains:

  • A contentGroupRefSet block containing an array of one or more blocks, each of which identifies a content group to which the resource is being added. Each one contains either:
    An id that identifies the content group, orBoth a providerId and a providerResourceId that identify the content group

  • A resourceRef block that identifies the resource that is being added to the content group(s). This contains:
    Either:An id that identifies the resource, orBoth a providerId and a providerResourceId that identify the resourcetype – the type of the resource being added. One of:editorialContenteditorialChannelcontentGroup

A PUT request with this payload adds the specified editorial content to the specified content group:

{
  "contentGroupLinkSet": [
    {
      "contentGroupRefSet": [
        {
          "providerId": "GLOBAL",
          "providerResourceId": "cg5"
        }
      ],
      "resourceRef": {
        "providerId": "GLOBAL",
        "providerResourceId": "ech01",
        "type": "editorialContent"
      }
    }
  ]
}

A successful request returns an HTTP 200 status.

A bad request returns an HTTP 400 status.

For full details of this API, see Content and Product Manager (CPM) API documentation: content v2.