OpenTV ENTera & OpenTV Platform Documentation

Ingesting a dynamic content group

Request

To create a dynamic content group (that is, a content group that is created and updated dynamically based on a search query), send a POST request to:

Bash
https://<host>:<port>/metadata/content/v1/dynamicContentGroups/

Headers

  • Content-Type: application/json

Mandatory arguments

All of the following arguments are part of the request body:

  • Either:

    • id – the ID of the content group, or

    • Both providerId and providerResourceId

  • dynamicParameters – the parameters that determine the content of the content group. It contains the following blocks:

    • sources – one or more blocks that restrict the content that can be included n the content group to the specified nodes or content groups.
      sources is optional. If it is not specified, the entire content catalogue is used.
      Each block within this section contains:

      • Either:

        • id – the ID of the node / content group, or

        • Both providerId and providerResourceId

      • type – the type of source (node or contentGroup)

    • criteria – specified the search query that the content group should be based on. It contains:

      • queryLanguage – the language of the query string

      • queryString – the query string

    • clientPageSize – the page size (number of items). This optional field allows the results to be split up for presentation.

    • clientResultLimit – limits the total number of results to be used in the group.

    • sortOrder – the sort order of the returned results

Other arguments

  • name – the content group’s name

  • description – a description of the content group

  • scope ????

  • enabled – whether the content group is enabled or not

The following fields are set internally by CPM and should not be used in this request:

  • creationDate

  • lastModificationDate

  • self

  • statusPerExportSet

Example

A POST request with this payload creates a new content group:

JSON
{
  "id": "string",
  "providerId": "string",
  "providerResourceId": "string",
  "name": "string",
  "description": "string",
  "dynamicParameters": {
    "sources": [
      {
        "id": "string",
        "providerId": "string",
        "providerResourceId": "string",
        "type": "node"
      }
    ],
    "criteria": {
      "queryLanguage": "string",
      "queryString": "string"
    },
    "clientPageSize": 0,
    "clientResultLimit": 0,
    "sortOrder": "string"
  },
  "scope": "string",
  "enabled": true
}

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.