Skip to main content
Skip table of contents

Creating a technical content

Request

To create a technical content, send a POST request to:

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

Headers

  • Content-Type: application/json

Mandatory arguments

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

  • Either:
    • id – the ID of the technical content, or
    • Both providerId and providerResourceId
  • name – the name of the content
  • start – the validity start date of the content
  • end – the validity end date of the content
  • playableAsset – the playable asset. This block contains:
    • uri  the URI of the asset
    • assetDeviceLocation – the asset device location (ADL) is a set of data that describes the asset location on a specific storage device. ADL type must be unique per asset. If an ADL with the specified type does not exist, it will be created. Otherwise, it will be updated. This consists of one or more blocks, each of which contains:
      • relativePath – the path (e.g., folder/ or ./folder1/folder2/) relative to the storage device access point. It can be empty.
      • storageDeviceId – the ID of the storage device where the asset is located. This storage device will be accessed through one of its access points.
      • type – the storage device type. Must be one of:
        • source
        • destination
        • archive
        • other
    • metadataSet – a set of locale-specific metadata blocks, each of which has:
      • locale* – the locale for the metadata element. If locale is set to none, the metadata block that it applies to is the default – it is the one that is used if there is no metadata 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:

        • CMS4MigratedData – CMS4MigratedData (boolean)
        • FileSize – file size
        • FrameDuration – frame duration
        • Comment – comment
        • BitRate – bitrate
  • editorialContentRef – the ID of the editorial content, expressed as either:
    • id – the ID of the editorial content, or
    • Both providerId and providerResourceId

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 (*).

  • assets – a list of supplementary assets. The format of this block is similar to playableAssets (above), except that it can contain multiple blocks, and each block can include a type, which specifies the type of the supplemental asset.
  • dynamicRange – the dynamic range(s) of the content. Required for QuickMark watermarking.
    Allowed values include but are not limited to: SDR, HDR10, HDR10+, HLG, and DV. Multiple values are allowed. The default is SDR.
  • referenceAsset – the content's reference asset. Specifying a reference asset on a technical content allows you to use a different reference asset for each technical content. This block contains:
    • uri* – an ID using either the schema "id" (e.g., id:de305d54-75b4) or a path relative to the ADL using the schema "relpath" (e.g., relpath://folder/, relpath://folder/mib.m3u8, or relpath:mib.m3u8).
    • type * – the asset type (e.g., SD or HD)
    • assetDeviceLocation – the asset device location (ADL) is a set of data that describes the asset location on a specific storage device. ADL type must be unique per asset. If an ADL with the specified type does not exist, it will be created. Otherwise, it will be updated. This consists of one or more blocks, each of which contains:
      • relativePath – the path (e.g., folder/ or ./folder1/folder2/) relative to the storage device access point. It can be empty.
      • storageDeviceId – the ID of the storage device where the asset is located. This storage device will be accessed through one of its access points.
      • type – the storage device type. Must be one of:
        • source
        • destination
        • archive
        • other
    • metadataSet – a set of locale-specific metadata blocks, each of which has:
      • locale* – the locale for the metadata element. If locale is set to none, the metadata block that it applies to is the default – it is the one that is used if there is no metadata 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:

        • CMS4MigratedData – CMS4 migrated data flag
        • FileSize – file size (string)
        • FrameDuration – frame duration (string)
        • Comment – comment
  • securityInfo – the content's security information. This block contains:
    • id* – the DRM or CAS ID of the element for the specified security device (DRM or CAS). This DRM/CAS ID is only valid in the context of the DRM/CAS device specified.
    • securityDeviceId* – the ID of the security device (CAS or DRM) assigned to the content
    • sessionGroupId – the ID of the session group assigned to the content (used for channel group session limits)
    • usageRule – the usage rule profile to apply to the channel. See Managing usage rules (live).
    • qmWaterMark – whether QuickMark watermarking should be enabled for the content (true or false)
    • cdnTokenDetails – CDN details for CDN token protection
      • cdnType – the CDN type (e.g., Broadpeak)
      • cdnId – the CDN ID (e.g., brdpk_cdn_id1)
    • metadataSet – a set of locale-specific metadata blocks, each of which has:
      • locale* – the locale for the metadata element. If locale is set to none, the metadata block that it applies to is the default – it is the one that is used if there is no metadata 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:

        • CMS4MigratedData
        • RetentionDuration
        • Evt_id 
  • profileIdSet – references to the ID(s) of the profile(s) that characterise the technical channel (semicolon-separated list)
  • timeShifting – whether timeshifting is enabled for the technical content. Contains:
    • shortTermCatchUpSupport* – whether short-term catchup is enabled for the content (true or false)
    • longTermCatchUpSupport* – whether long-term catchup is enabled for the content (true or false)
  • rights – content consumption properties:
    • storageAllowed – whether a download is permitted for the content (true or false).
      Note that OpenTV Video Platform does not yet provide authorisation services for downloaded content. This flag indicates that
      clients can download content, as long as authorisation is handled by a third-party system.
  • metadataSet – a set of locale-specific metadata blocks, each of which has:
    • locale* – the locale for the metadata element. If locale is set to none, the metadata block that it applies to is the default – it is the one that is used if there is no metadata 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 content title
      • Description* – description of the content

Example

A POST request with this payload creates a technical content:

CODE
{
    "id": "9462470-F-ABR",
    "providerId": "OPERATOR",
    "providerResourceId": "9462470-F-ABR",
    "name": "Fishing Impossible/S02/E07/VOD/Cornwall/9462470-F-ABR",
    "start": "2017-03-30T13:00:00Z",
    "end": "2023-04-04T13:59:59Z",
    "playableAsset": {
        "uri": "ref1uri",
        "metadataSet": {
            "metadata": [{
                    "value": "ref1value1",
                    "key": "ref1key1"
                },
                {
                    "value": "ref1value2",
                    "key": "ref1key2"
                }
            ],
            "locale": "none"
        },
        "assetDeviceLocation": [{
                "relativePath": "ref1relPath1",
                "storageDeviceId": "ref1devID1",
                "type": "source"
            },
            {
                "relativePath": "ref1relPath2",
                "storageDeviceId": "ref1devID2",
                "type": "destination"
            }
        ]
    },
    "referenceAsset": {
         "uri": "store2/ON730009/ON730009_hss.ism/manifest_hd1",
         "type": "abcd",
         "metadataSet": {
              "locale": "none",
              "metadata": [     
                   {
                        "key": "drmInstanceName",
                        "value": "CTRL1"
                   },						
                   {
                        "key": "FrameDuration",
                        "value": "93275"
                   },
                   {
                        "key": "CMS4MigratedData",
                        "value": "true"
                   },						
                   {
                        "key": "Format",
                        "value": "AV_PlaylistName"
                   },						
                   {
                        "key": "FileSize",
                        "value": "2737741105"
                   }
               ]
            },
            "assetDeviceLocation": [
               {
                   "relativePath": "",
                   "storageDeviceId": "storageDeviceId",
                   "type": "destination"
               }
         ]
     },			
     "metadataSet": [{
        "locale": "none",
        "metadata": [{
                "key": "Duration",
                "value": "2903"
            },
            {
                "key": "Rating",
                "value": "PG"
            },
            {
                "key": "Aspect",
                "value": "16x9"
            },
            {
                "key": "AudioMode",
                "value": "Stereo"
            },
            {
                "key": "Subtitles",
                "value": ""
            },
            {
                "key": "Colour",
                "value": "Colour"
            },
            {
                "key": "Definition",
                "value": "HD"
            },
            {
                "key": "ServiceLongName",
                "value": "BBK"
            },
            {
                "key": "CUStartDate",
                "value": "2017-03-30T13:00:00Z"
            },
            {
                "key": "CUEndDate",
                "value": "2023-04-04T13:59:59Z"
            },
            {
                "key": "PrivateMetadata",
                "value": "ext_event_id=19666667"
            },
            {
                "key": "CUST_FileSize",
                "value": "2104367207"
            },
            {
                "key": "CUST_RetentionPeriod",
                "value": "672"
            }
        ]
    }],
    "editorialContentRef": {
        "id": "9462470"

    }
}

Response

A successful request returns an HTTP 201 status. The response body contains the URI of the newly-created technical content.

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.

JavaScript errors detected

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

If this problem persists, please contact our support.