Skip to main content
Skip table of contents

Specifying custom metadata to be used by the recommendation engine

Overview

If your content has additional custom metadata that you want OpenTV Video Platform to pass to the recommendation engine, you can do this by using Business Configuration Manager's fields API to make Platform aware of the fields and to push the metadata to the recommendation engine.

Request

To add a custom field, send a POST request to:

CODE
http://<host>:<port>/businessConfig/admin/v1/fields

Headers

  • Content-Type: application/json

Mandatory fields

  • id – the field ID

  • name – the field name

  • dataType – the field’s data type. Must be one of String, Integer, Boolean, Date, Object, List.

  • entityType – the entity that the metadata applies to. In this case, it must be one of the following (to indicate the entity type and the fact that the field is to be used for recommendations):

    • EditorialContentRecommendations

    • TechnicalContentRecommendations

    • EventRecommendations

    • SeriesRecommendations

    • SeasonRecommendations

  • value – the default value for the field

  • displayOrder – the position of the field in the display order

Other arguments

  • scope – whether the field is a core field or a custom field. In this case, it must be custom.

  • displayName – the display name for the field. If not specified, name is used.

  • isLocalised – whether this is a localised field (that is, the name displayed for it should be localised)

  • isDangerous – whether the field contains sensitive data that should not be exposed to a wider audience

  • options – localised values for the field. See Business Configuration Manager (BCM) API documentation: core for syntax.

Example

A request with this payload adds the specified field:

JSON
{
  "id": "654a2076e18bde731ddc08d",
  "name": "IMDB_reference",
  "dataType": "String",
  "scope": "custom",
  "isLocalised": false,
  "isDangerous": false,
  "entityType": "EditorialContent",
}

Response

A successful request returns an HTTP 201 status containing the ID of the added field.

For example:

JSON
{
  "id": "654a2076e18bde731ddc08d"
}

A bad request (for example, when the specified ID already exists) returns an HTTP 400 status.

See also

Business Configuration Manager (BCM) API documentation: core

JavaScript errors detected

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

If this problem persists, please contact our support.