list streaming policies.md
List Streaming Policies
Media API · Streaming Policies
GET https://app.mk.io/api/v1/projects/{project_name}/media/streamingPolicies
Listing, Sorting and Filtering Streaming Policies
This endpoint returns the list of streaming policies in the specified project.
Sorting
The results from this endpoint can be ordered using the $orderby query parameter. Specify a list of field names, separated by commas where each one can optionally specify asc or desc.
Sorting is valid on the following fields: created, createdBy, id, name, properties/created, updated, updatedBy
Filtering
The $filter query parameter allows for streaming policies to be filtered on the basis of fields in the schema using OData query syntax. See this document for more details on the syntax used.
Filters are valid on the following fields: created, createdBy, createdByEmail, createdByName, id, name, properties/created, updated, updatedBy, updatedByEmail, updatedByName
Examples:
?$top=10 - Returns only the first 10 streaming policies from the list.
?$orderby=name desc - Sorts streaming policies by name in descending order.
?$filter=name eq 'descriptive name' - Returns streaming policies that match the provided name.
?$orderby=created desc - Sorts streaming policies by creation date in descending order.
?$filter=created ge 2021-01-01T00:00:00Z - Returns streaming policies created after January 1, 2021.
Note that the default policies will always appear in the results
RBAC Capability Required: ams.streamingpolicy.get
Authentication
Authorizationheader — Bearer authentication of the formBearer <token>.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
project_name |
string | Yes | — |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
$orderby |
string | No | Specifies the key by which the result collection should be ordered. |
$filter |
string | No | Restricts the set of items returned. |
$top |
string | No | Specifies a non-negative integer n that limits the number of items returned from a collection. |
$skiptoken |
string | No | Specifies a start offset to support paginated results. Use @odata.nextLink in the result object to enumerate the collection - it will be present only if there's more than one page of entities. |
Example request
curl -X GET "https://app.mk.io/api/v1/projects/{project_name}/media/streamingPolicies" \
-H "Authorization: Bearer <token>"
Responses
200 — A list of streaming policies.
@odata.nextLink· string · Optional — @odata.nextLink URL if the page length and number of items match.supplemental· object · Required — Supplemental infocount· integer · Required — Number of items returnedkind· string · Required — Type of items in the listoperation· string · Required — Operation type. Should always say 'list'pagination· object · Required — Pagination infoend· integer · Required — Position of the last item in the listrecords· integer · Required — Total number of items returned in the liststart· integer · Required — Position of the first item in the listtotal· integer · Required — Total number of items in the project
subscription· object · Optional — Project infoid· string · Required — Project IDname· string · Required — Project name
value· list of objects · Required — A list of streaming policies.- Array items (object):
id· string · Optional — Fully qualified resource ID for the resource.name· string · Optional · 1-260 characters · pattern: ^[^'<>%&:?/*+]+$ — The name of the resourceproperties· object · Required — The properties of the streaming policy.catalog· map from strings to any · Optional — The custom catalog configuration.[any key]· any — map of additional properties
commonEncryptionCbcs· object · Optional — CommonEncryptionCbcsclearKeyEncryptionConfiguration· object · Optional — Clear key configurationcustomKeysAcquisitionUrlTemplate· string · Optional — The custom license acquisition URL template for a Clear Key license delivery service.
clearTracks· list of objects · Optional — This represents which tracks should not be encrypted.- Array items (object):
trackSelections· list of objects · Optional — track selections is used to specify a set or a subset of track for selection by the streaming policy.- Array items (object):
operation· enum · Required — Track property operation. Only equality is supported.- Allowed values:
Unknown,Equal
- Allowed values:
property· enum · Required — Track property type- Allowed values:
Unknown,FourCC
- Allowed values:
value· string · Optional — Track property value
- Array items (object):
- Array items (object):
contentKeys· object · Optional — Content keys used by the streaming policy.defaultKey· object · 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 · 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.- Array items (object):
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.tracks· list of objects · Optional — This represents which tracks should be encrypted.- Array items (object):
trackSelections· list of objects · Optional — track selections is used to specify a set or a subset of track for selection by the streaming policy.- Array items (object):
operation· enum · Required — Track property operation. Only equality is supported.- Allowed values:
Unknown,Equal
- Allowed values:
property· enum · Required — Track property type- Allowed values:
Unknown,FourCC
- Allowed values:
value· string · Optional — Track property value
- Array items (object):
- Array items (object):
- Array items (object):
drm· object · Optional — DRM configurationfairPlay· object · Optional — FairPlay configurationallowPersistentLicense· boolean · Required — Allow persistent licensecustomLicenseAcquisitionUrlTemplate· string · Optional — The custom license acquisition URL template for a FairPlay license delivery service.
playReady· object · Optional — PlayReady configurationcustomLicenseAcquisitionUrlTemplate· string · Optional — The custom license acquisition URL template for a PlayReady license delivery service.playReadyCustomAttributes· string · Optional — The custom attributes for PlayReady.
widevine· object · Optional — Widevine configurationcustomLicenseAcquisitionUrlTemplate· string · Optional — The custom license acquisition URL template for a Widevine license delivery service.
enabledProtocols· object · 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 protocoldownload· boolean · Required — Enable download protocolhls· boolean · Required — Enable HLS protocolsmoothStreaming· boolean · Required — Smooth streaming is not supported and the value of this field is ignored.
commonEncryptionCenc· object · Optional — CommonEncryptionCencclearKeyEncryptionConfiguration· object · Optional — Clear key configurationcustomKeysAcquisitionUrlTemplate· string · Optional — The custom license acquisition URL template for a Clear Key license delivery service.
clearTracks· list of objects · Optional — This represents which tracks should not be encrypted.- Array items (object):
trackSelections· list of objects · Optional — track selections is used to specify a set or a subset of track for selection by the streaming policy.- Array items (object):
operation· enum · Required — Track property operation. Only equality is supported.- Allowed values:
Unknown,Equal
- Allowed values:
property· enum · Required — Track property type- Allowed values:
Unknown,FourCC
- Allowed values:
value· string · Optional — Track property value
- Array items (object):
- Array items (object):
contentKeys· object · Optional — Content keys used by the streaming policy.defaultKey· object · 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 · 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.- Array items (object):
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.tracks· list of objects · Optional — This represents which tracks should be encrypted.- Array items (object):
trackSelections· list of objects · Optional — track selections is used to specify a set or a subset of track for selection by the streaming policy.- Array items (object):
operation· enum · Required — Track property operation. Only equality is supported.- Allowed values:
Unknown,Equal
- Allowed values:
property· enum · Required — Track property type- Allowed values:
Unknown,FourCC
- Allowed values:
value· string · Optional — Track property value
- Array items (object):
- Array items (object):
- Array items (object):
drm· object · Optional — DRM configurationplayReady· object · Optional — PlayReady configurationcustomLicenseAcquisitionUrlTemplate· string · Optional — The custom license acquisition URL template for a PlayReady license delivery service.playReadyCustomAttributes· string · Optional — The custom attributes for PlayReady.
widevine· object · Optional — Widevine configurationcustomLicenseAcquisitionUrlTemplate· string · Optional — The custom license acquisition URL template for a Widevine license delivery service.
enabledProtocols· object · 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 protocoldownload· boolean · Required — Enable download protocolhls· boolean · Required — Enable HLS protocolsmoothStreaming· 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 · Optional — EnvelopeEncryptionclearTracks· list of objects · Optional — Clear tracks. This is the set of tracks that will be delivered without envelope encryption.- Array items (object):
trackSelections· list of objects · Optional — track selections is used to specify a set or a subset of track for selection by the streaming policy.- Array items (object):
operation· enum · Required — Track property operation. Only equality is supported.- Allowed values:
Unknown,Equal
- Allowed values:
property· enum · Required — Track property type- Allowed values:
Unknown,FourCC
- Allowed values:
value· string · Optional — Track property value
- Array items (object):
- Array items (object):
contentKeys· object · Optional — Content keys used by the streaming policy.defaultKey· object · 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 · 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.- Array items (object):
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.tracks· list of objects · Optional — This represents which tracks should be encrypted.- Array items (object):
trackSelections· list of objects · Optional — track selections is used to specify a set or a subset of track for selection by the streaming policy.- Array items (object):
operation· enum · Required — Track property operation. Only equality is supported.- Allowed values:
Unknown,Equal
- Allowed values:
property· enum · Required — Track property type- Allowed values:
Unknown,FourCC
- Allowed values:
value· string · Optional — Track property value
- Array items (object):
- Array items (object):
- Array items (object):
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.enabledProtocols· object · 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 protocoldownload· boolean · Required — Enable download protocolhls· boolean · Required — Enable HLS protocolsmoothStreaming· boolean · Required — Smooth streaming is not supported and the value of this field is ignored.
noEncryption· object · Optional — NoEncryptionenabledProtocols· object · Optional — Enabled protocols. This is the set of protocols (dash, download, and hls) that will be delivered without encryption.dash· boolean · Required — Enable Dash protocoldownload· boolean · Required — Enable download protocolhls· boolean · Required — Enable HLS protocolsmoothStreaming· boolean · Required — Smooth streaming is not supported and the value of this field is ignored.
systemData· object · Optional — Metadata pertaining to creation and last modification of the resource.createdAt· string · Required · format: date-time — The timestamp of resource creation (UTC).createdBy· string · Required — The identity that created the resource.createdByType· enum · Required — The type of identity that created the resource.- Allowed values:
User,Application,ManagedIdentity,Key
- Allowed values:
internalId· string · Required · format: uuid — The internal ID of the resource.lastModifiedAt· string · Required · format: date-time — The timestamp of resource last modification (UTC).lastModifiedBy· string · Required — The identity that last modified the resource.lastModifiedByType· enum · Required — The type of identity that last modified the resource.- Allowed values:
User,Application,ManagedIdentity,Key
- Allowed values:
type· string · Optional — The type of the resource. E.g. "Microsoft.Media/mediaservices/assets"
- Array items (object):
400 — Bad Request
error· object · 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.[any key]· any — map of additional properties
ref· string · Required — A reference to the request that caused the error.status· integer · Required — The HTTP status code
401 — Unauthorized
403 — Forbidden
404 — Not Found
429 — Too Many Requests
500 — Internal Server Error
Source spec: media-api · operationId: [get]_/api/v1/projects/{project_name}/media/streamingPolicies