Creating events
Request
To create an event, send a POST request to:
https://<host>:<port>/metadata/content/v1/events
There is also an API for creating multiple events as a single request – see PUT /channelEvents
in Content and Product Manager (CPM) API documentation: content v1
Headers
Content-Type: application/json
Mandatory arguments
All of the following arguments are part of the request body:
id
– the event's unique IDproviderId
– the provider IDproviderResourceId
– the provider resource IDeditorialChannelRef
– the channel that the event belongs to. Note that this must contain either:id
– the ID of the editorial channel, or- Both
providerId
andproviderResourceId
editorialContentRef
>id
– the ID of the event's content. Note that this must contain either:id
– the ID of the editorial channel, or- Both
providerId
andproviderResourceId
name
– the name of the eventstart
– the event start time (in ISO 8601 format)end
– the event end time (in ISO 8601 format)
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 (*).
metadataSet
– a set of locale-specificmetadata
blocks, each of which has:locale
– the locale for themetadata
element. If locale is set to none, themetadata
block that it applies to is the default – it is the one that is used if there is nometadata
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 event titleDescription
– description of the eventfilteringList
– a comma-separated list of country codes, used for geo-filteringfilteringListIsAllowList
– specifies whetherfilteringList
is an allowed list (true) or a restricted list (false)blockingList
– a list of country codes where playback is allowedblockVpn
– a global per operator value to indicate if VPN blocking is turned on or off (true or false)blockIfOffNet
– filtering of content for on/off network (true or false)EntityType
– entity type setting thecontentType
on the generated editorial content.
airingStartTime
* – the actual airing start time (which may be different from the original start time)airingEndTime
* – the actual airing end time (which may be different from the original end time)timeShifting*
– enables or disables timeshifting for the event. The following can be enabled/disabled individually:Note that setting one of these flags to
true
for an event DOES NOT override a setting offalse
at the editorial or technical channel level.However, setting a flag to
false
at the event level DOES override a setting oftrue
at the editorial or technical channel level.A flag must be set to true at all three levels for the feature to be enabled for the event.
See Setting active status for catch-up, start-over and NPVR for more information.
shortTermCatchUpSupport
* – enables/disables short-term catchup (true or false)longTermCatchUpSupport
* – enables/disables long-term catch-up (true or false)s
tartOverSupport
– enables/disabled start-over (true or false)n
etworkPvrSupport
– enables/disables network PVR (true or false)
parentalRatings
– sets parental ratings for the content:ratingBodyName
– the name of the rating bodycontentRatingCode
– the rating code for the eventcountryCode
– the country code
clientControls
– specifies the capability products that are enabled/disabled for the event (for example, catch-up or start-over). This is a block containing one or more key/value pairs in the following form:CODE[{ "key": "<key_name>", "value": true|false }]
Here:
key_name
is the name of a capability that has been configured in Platform.value
istrue
orfalse
.true
means that the product is enabled for the event.false
means it is disabled.
Example
A POST request with this payload creates an event:
{
"editorialChannelRef": {
"id": "BE2"
},
"editorialContentRef": {
"id": "HWW9944033"
},
"timeShifting": {
"shortTermCatchUpSupport": true,
"startOverSupport": true
},
"id": "HWW9944033-BE2113421924",
"providerId": "OPERATOR",
"providerResourceId": "HWW9944033-BE2113421924",
"name": "AFCON 2019: Senegal v Tunisia SF /S2019 /E49",
"start": "2021-02-15T14:20:00Z",
"end": "2021-02-15T16:35:00Z",
"metadataSet": [{
"locale": "en_GB",
"metadata": [{
"key": "Description",
"value": "Coverage from the 32nd edition of the Africa Cup of Nations hosted by Egypt. Will defending champions Cameroon be able to claim their second successive title?"
},
{
"key": "Episode",
"value": "Senegal v Tunisia SF"
},
{
"key": "Title",
"value": "AFCON 2019: Senegal v Tunisia SF"
},
{
"key": "Synopsis",
"value": "Coverage from the 32nd edition of the Africa Cup of Nations hosted by Egypt. Will defending champions Cameroon be able to claim their second successive title?"
}
]
},
{
"locale": "none",
"metadata": [{
"key": "ContentType",
"value": "TV_EPS"
},
{
"key": "Language",
"value": "eng"
},
{
"key": "AudioMode",
"value": "Stereo"
},
{
"key": "DvbCategories",
"value": "0:0:6:E"
},
{
"key": "Subtitles",
"value": "eng-HearingImpaired"
},
{
"key": "CMS4MigratedData",
"value": "true"
},
{
"key": "SOCU_filename",
"value": "BE2113421924/1611238800/8100/manifest"
},
{
"key": "Definition",
"value": "HD"
},
{
"key": "Aspect",
"value": "Widescreen"
},
{
"key": "Rating",
"value": "NC"
},
{
"key": "EntityType",
"value": "tvshow"
},
{
"key": "Colour",
"value": "Colour"
},
{
"key": "Categories",
"value": "SPORT - SOCCER"
}
]
}
]
}
Response
A successful request returns an HTTP 201 status. The response contains the URI of the event that was created.
A bad request returns an HTTP 400 status.
Example
{
"self": "<value>"
...
}
See also
For full details of this API, see Content and Product Manager (CPM) API documentation: content v1.