Create or Update – Media API – MediaKind
Create or Update
put https://app.mk.io/api/v1/projects/:project_name/media/streamingPolicies/:policy_name
Create or update a Streaming Policy. Updating an existing policy may not be available on all accounts.
RBAC Capability Required: ams.streamingpolicy.create or ams.streamingpolicy.update
Authentication
Authorization Bearer
Bearer authentication of the form Bearer <token>, where token is your auth token.
Path parameters
project_name string Required
policy_name string Required
Request
This endpoint expects an object.
properties object StreamingPolicyProperties Required
The properties of the streaming policy.
Show 6 properties
catalog map from strings to any Optional
The custom catalog configuration.commonEncryptionCbcs object CommonEncryptionCbcs Optional
CommonEncryptionCbcsclearKeyEncryptionConfiguration object ClearKeyEncryptionConfiguration Optional
Clear key configurationcustomKeysAcquisitionUrlTemplate string Optional
The custom license acquisition URL template for a Clear Key license delivery service.clearTracks list of objects StreamingPolicyTrackSelection Optional
This represents which tracks should not be encrypted.trackSelections list of objects StreamingPolicyTrackPropertyCondition Optional
track selections is used to specify a set or a subset of track for selection by the streaming policy.
operation enum Required
Track property operation. Only equality is supported. Allowed values: Unknown, Equal
property enum Required
Track property type Allowed values: Unknown, FourCC
value string Optional
Track property value
contentKeys object StreamingPolicyContentKeys Optional
Content keys used by the streaming policy.
defaultKey object DefaultKey Optional
Default content key used by the encryption.label string Optional
Labels are a potential matching field for selecting a content key via a streaming locator.policyName string Optional
Policy used by the key.keyToTrackMappings list of objects StreamingPolicyContentKey Optional
List of content keys used by the key. Used to assign different keys to different tracks. For instance, using widevine L3 for SD and L1 for HD.tracks list of objects StreamingPolicyTrackSelection Optional
This represents which tracks should be encrypted.
trackSelections list of objects StreamingPolicyTrackPropertyCondition Optional
track selections is used to specify a set or a subset of track for selection by the streaming policy.
operation enum Required
Track property operation. Only equality is supported. Allowed values: Unknown, Equal
property enum Required
Track property type Allowed values: Unknown, FourCC
value string Optional
Track property value
drm object CbcsDrmConfiguration Optional
DRM configuration
fairPlay object StreamingPolicyFairPlayConfiguration Optional
FairPlay configurationallowPersistentLicense boolean Required
Allow persistent licensecustomLicenseAcquisitionUrlTemplate string Optional
playReady object StreamingPolicyPlayReadyConfiguration Optional
PlayReady configurationcustomLicenseAcquisitionUrlTemplate string Optional
playReadyCustomAttributes string Optional
widevine object StreamingPolicyWidevineConfiguration Optional
Widevine configurationcustomLicenseAcquisitionUrlTemplate string Optional
enabledProtocols object EnabledProtocols Optional
Enabled protocols. This is the set of protocols (dash, download, and hls) that will be delivered with common encryption.
dash boolean Required
Enable Dash protocol
download boolean Required
Enable download protocol
hls boolean Required
Enable HLS protocol
smoothStreaming boolean Required
Smooth streaming is not supported and the value of this field is ignored.
commonEncryptionCenc object CommonEncryptionCenc Optional
CommonEncryptionCenc
clearKeyEncryptionConfiguration object ClearKeyEncryptionConfiguration Optional
Clear key configuration
customKeysAcquisitionUrlTemplate string Optional
clearTracks list of objects StreamingPolicyTrackSelection Optional
This represents which tracks should not be encrypted.
operation enum Required
Track property operation. Only equality is supported. Allowed values: Unknown, Equal
property enum Required
Track property type Allowed values: Unknown, FourCC
value string Optional
Track property value
contentKeys object StreamingPolicyContentKeys Optional
Content keys used by the streaming policy.defaultKey object DefaultKey Optional
Default content key used by the encryption.label string Optional
Labels are a potential matching field for selecting a content key via a streaming locator.policyName string Optional
Policy used by the key.
operation enum Required
Track property operation. Only equality is supported. Allowed values: Unknown, Equal
property enum Required
Track property type Allowed values: Unknown, FourCC
value string Optional
Track property value
drm object CencDrmConfiguration Optional
DRM configurationcustomLicenseAcquisitionUrlTemplate string Optional
playReadyCustomAttributes string Optional
customLicenseAcquisitionUrlTemplate string Optional
enabledProtocols object EnabledProtocols Optional
Enabled protocols. This is the set of protocols (dash, download, and hls) that will be delivered with envelope encryption.
dash boolean Required
Enable Dash protocol
download boolean Required
Enable download protocol
hls boolean Required
Enable HLS protocol
smoothStreaming boolean Required
Smooth streaming is not supported and the value of this field is ignored.
- defaultContentKeyPolicyName string Optional <=260 characters The default content key policy name used by current streaming policy.
envelopeEncryption object EnvelopeEncryption Optional
EnvelopeEncryption
- clearTracks list of objects StreamingPolicyTrackSelection Optional
Clear tracks. This is the set of tracks that will be delivered without envelope encryption.
operation enum Required
Track property operation. Only equality is supported. Allowed values: Unknown, Equal
property enum Required
Track property type Allowed values: Unknown, FourCC
value string Optional
Track property value
defaultKey object DefaultKey Optional
Default content key used by the encryption.label string Optional
Labels are a potential matching field for selecting a content key via a streaming locator.policyName string Optional
Policy used by the key.
operation enum Required
Track property operation. Only equality is supported. Allowed values: Unknown, Equal
property enum Required
Track property type Allowed values: Unknown, FourCC
value string Optional
Track property value
- customKeyAcquisitionUrlTemplate string Optional 1-1024 characters Optional template for the customer service to use for key acquisition. Not needed if using the built-in key delivery service.
dash boolean Required
Enable Dash protocol
download boolean Required
Enable download protocol
hls boolean Required
Enable HLS protocol
smoothStreaming boolean Required
Smooth streaming is not supported and the value of this field is ignored.
- noEncryption object NoEncryption Optional
NoEncryption
enabledProtocols object EnabledProtocols Optional
Enabled protocols. This is the set of protocols (dash, download, and hls) that will be delivered without encryption.
dash boolean Required
Enable Dash protocol
download boolean Required
Enable download protocol
hls boolean Required
Enable HLS protocol
smoothStreaming boolean Required
Smooth streaming is not supported and the value of this field is ignored.
Response
200 Streaming Policy updated
id string Optional
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}name string Optional 1-260 characters pattern: ^[^\'<>%&:?/*+]+$
The name of the resource
properties object StreamingPolicyProperties Required
The properties of the streaming policy.catalog map from strings to any Optional
The custom catalog configuration.customKeysAcquisitionUrlTemplate string Optional
The custom license acquisition URL template for a Clear Key license delivery service.
operation enum Required
Track property operation. Only equality is supported. Allowed values: Unknown, Equal
property enum Required
Track property type Allowed values: Unknown, FourCC
value string Optional
Track property value
defaultKey object DefaultKey Optional
Default content key used by the encryption.label string Optional
Labels are a potential matching field for selecting a content key via a streaming locator.policyName string Optional
Policy used by the key.
operation enum Required
Track property operation. Only equality is supported. Allowed values: Unknown, Equal
property enum Required
Track property type Allowed values: Unknown, FourCC
value string Optional
Track property value
drm object CbcsDrmConfiguration Optional
DRM configurationallowPersistentLicense boolean Required
Allow persistent licensecustomLicenseAcquisitionUrlTemplate string Optional
customLicenseAcquisitionUrlTemplate string Optional
playReadyCustomAttributes string Optional
customLicenseAcquisitionUrlTemplate string Optional
dash boolean Required
Enable Dash protocol
download boolean Required
Enable download protocol
hls boolean Required
Enable HLS protocol
smoothStreaming boolean Required
Smooth streaming is not supported and the value of this field is ignored.
customKeysAcquisitionUrlTemplate string Optional
operation enum Required
Track property operation. Only equality is supported. Allowed values: Unknown, Equal
property enum Required
Track property type Allowed values: Unknown, FourCC
value string Optional
Track property value
defaultKey object DefaultKey Optional
Default content key used by the encryption.label string Optional
Labels are a potential matching field for selecting a content key via a streaming locator.policyName string Optional
Policy used by the key.
operation enum Required
Track property operation. Only equality is supported. Allowed values: Unknown, Equal
property enum Required
Track property type Allowed values: Unknown, FourCC
value string Optional
Track property value
dash boolean Required
Enable Dash protocol
download boolean Required
Enable download protocol
hls boolean Required
Enable HLS protocol
smoothStreaming boolean Required
Smooth streaming is not supported and the value of this field is ignored.
- noEncryption object NoEncryption Optional
NoEncryption
dash boolean Required
Enable Dash protocol
download boolean Required
Enable download protocol
hls boolean Required
Enable HLS protocol
smoothStreaming boolean Required
Smooth streaming is not supported and the value of this field is ignored.
Errors
400 Bad Request
error object ErrorDetail Required
Pertinent information about the errorcode string Required
The error code.detail string Required
The error message.extraDetail map from strings to any Optional
Extra information regarding this error.ref string Required
A reference to the request that caused the error.status integer Required
The HTTP status code
401 Unauthorized
error object ErrorDetail Required
Pertinent information about the errorcode string Required
The error code.detail string Required
The error message.extraDetail map from strings to any Optional
Extra information regarding this error.ref string Required
A reference to the request that caused the error.status integer Required
The HTTP status code
403 Forbidden
error object ErrorDetail Required
Pertinent information about the errorcode string Required
The error code.detail string Required
The error message.extraDetail map from strings to any Optional
Extra information regarding this error.ref string Required
A reference to the request that caused the error.status integer Required
The HTTP status code
404 Not Found
error object ErrorDetail Required
Pertinent information about the errorcode string Required
The error code.detail string Required
The error message.extraDetail map from strings to any Optional
Extra information regarding this error.ref string Required
A reference to the request that caused the error.status integer Required
The HTTP status code
429 Too Many Requests
error object ErrorDetail Required
Pertinent information about the errorcode string Required
The error code.detail string Required
The error message.extraDetail map from strings to any Optional
Extra information regarding this error.ref string Required
A reference to the request that caused the error.status integer Required
The HTTP status code
500 Internal Server Error
error object ErrorDetail Required
Pertinent information about the errorcode string Required
The error code.detail string Required
The error message.extraDetail map from strings to any Optional
Extra information regarding this error.ref string Required
A reference to the request that caused the error.status integer Required
The HTTP status code