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:
http://<host>:<port>/businessConfig/admin/v1/fields
Headers
Content-Type: application/json
Mandatory fields
id
– the field IDname
– the field namedataType
– the field’s data type. Must be one ofString
,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 fielddisplayOrder
– 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 becustom
.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 audienceoptions
– 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:
{
"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:
{
"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