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

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.

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

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

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.

envelopeEncryption object EnvelopeEncryption Optional

EnvelopeEncryption

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

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.

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

The name of the resource

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

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.

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

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.

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

401 Unauthorized

403 Forbidden

404 Not Found

429 Too Many Requests

500 Internal Server Error