List Content Key Policies – Media API – MediaKind

List Content Key Policies

get https://app.mk.io/api/v1/projects/:project_name/media/contentKeyPolicies

Listing, Sorting and Filtering Content Key Policies

This endpoint returns the list of content key 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, properties/lastModified, properties/policyId, updated, updatedBy

Filtering

The $filter query parameter allows for content key 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, properties/lastModified, properties/policyId, updated, updatedBy, updatedByEmail, updatedByName

Examples:

?$top=10 - Returns only the first 10 content key policies from the list.

?$orderby=name desc - Sorts content key policies by name in descending order.

?$filter=name eq 'descriptive name' - Returns content key policies that match the provided name.

?$orderby=created desc - Sorts content key policies by creation date in descending order.

?$filter=created ge 2021-01-01T00:00:00Z - Returns content key policies created after January 1, 2021.

RBAC Capability Required: ams.contentkeypolicy.get

Authentication

Authorization Bearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

project_namestringRequired

Query parameters

$orderbystringOptional

Specifies the key by which the result collection should be ordered.

$filterstringOptional

Restricts the set of items returned.

$topstringOptional

Specifies a non-negative integer n that limits the number of items returned from a collection. The service returns the number of available items up to but not greater than the specified value n.

$skiptokenstringOptional

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.

Response

200A list of content key policies.

@odata.nextLinkstringOptional

@odata.nextLink URL if the page length and number of items match.

supplementalobject ListResponseSupplementalSchema Required

Supplemental info

Show 5 propertiesHide 5 properties

countintegerRequired

Number of items returned

kindstringRequired

Type of items in the list

operationstringRequired

Operation type. Should always say 'list'

paginationobject PaginationInfoSchema Required

Pagination info

Show 4 propertiesHide 4 properties

endintegerRequired

Position of the last item in the list

recordsintegerRequired

Total number of items returned in the list

startintegerRequired

Position of the first item in the list

totalintegerRequired

Total number of items in the project

subscriptionobject ProjectInfoSchema Optional

Project info

Show 2 propertiesHide 2 properties

idstringRequired

Project ID

namestringRequired

Project name

valuelist of objects ContentKeyPolicySchema Required

A list of content key policies.

Show 5 propertiesHide 5 properties

idstringOptional

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

namestringOptional1-260 characterspattern: ^[^\^\'<>%&:\?/*+]+$

The name of the resource

propertiesobject ContentKeyPolicyProperties Required

The key policy

Show 6 propertiesHide 6 properties

createdstringOptionalformat: date-time

The creation date of the Policy

descriptionstringOptional0-1024 characters

A description for the Policy.

fairPlayAmsCompatibilitybooleanOptional

FairPlay AMS compatibility enabled.

lastModifiedstringOptionalformat: date-time

The last modified date of the Policy

optionslist of objects ContentKeyPolicyOption Required

The Key Policy options.

Show 4 propertiesHide 4 properties

configurationobjectRequired

The key delivery configuration.

Show 5 variantsHide 5 variants

Discriminated by @odata.type. Select one variant:

#Microsoft.Media.ContentKeyPolicyClearKeyConfigurationobject ContentKeyPolicyClearKeyConfiguration

Represents a configuration for non-DRM keys.

@odata.typestringRequired

The discriminator for derived types.

#Microsoft.Media.ContentKeyPolicyFairPlayConfigurationobject ContentKeyPolicyFairPlayConfiguration

Specifies a configuration for FairPlay licenses.

@odata.typestringRequired

The discriminator for derived types.

askstring or nullRequiredformat: byte

The key that must be used as FairPlay Application Secret key. This needs to be base64 encoded.

fairPlayPfxstring or nullRequired

The Base64 representation of FairPlay certificate in PKCS 12 (pfx) format (including private key).

fairPlayPfxPasswordstring or nullRequired

The password encrypting FairPlay certificate in PKCS 12 (pfx) format.

offlineRentalConfigurationobject ContentKeyPolicyFairPlayOfflineRentalConfiguration Optional

Offline rental policy

Show 2 propertiesHide 2 properties

playbackDurationSecondsintegerRequired

Playback duration

storageDurationSecondsintegerRequired

Storage duration

rentalAndLeaseKeyTypeenumRequired

The rental and lease key type.

Allowed values:UnknownUndefinedDualExpiryPersistentUnlimitedPersistentLimited

rentalDurationintegerRequired

The rental duration. Must be greater than or equal to 0.

#Microsoft.Media.ContentKeyPolicyPlayReadyConfigurationobject ContentKeyPolicyPlayReadyConfiguration

Specifies a configuration for PlayReady licenses.

@odata.typestringRequired

The discriminator for derived types.

licenseslist of objects ContentKeyPolicyPlayReadyLicense Required

The PlayReady licenses.

Show 11 propertiesHide 11 properties

allowTestDevicesbooleanRequired

A flag indicating whether test devices can use the license.

beginDatestringOptionalformat: date-time

The begin date of license

contentKeyLocationobjectRequired

The content key location.

Show 2 variantsHide 2 variants

Discriminated by @odata.type. Select one variant:

#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeaderobject ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader

Specifies that the content key ID is in the PlayReady header.

@odata.typestringRequired

The discriminator for derived types.

#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifierobject ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier

Specifies that the content key ID is specified in the PlayReady configuration.

@odata.typestringRequired

The discriminator for derived types.

keyIdstring or nullRequiredformat: uuid

The content key ID.

contentTypeenumRequired

The PlayReady content type.

Allowed values:UnknownUnspecifiedUltraVioletDownloadUltraVioletStreaming

expirationDatestringOptionalformat: date-time

The expiration date of license.

gracePeriodstringOptionalformat: duration

The grace period of license.

licenseTypeenumRequired

The license type.

Allowed values:UnknownNonPersistentPersistent

playRightobject ContentKeyPolicyPlayReadyPlayRight Optional

The license PlayRight

Show 13 propertiesHide 13 properties

agcAndColorStripeRestrictionintegerOptional0 to 3

Configures Automatic Gain Control (AGC) and Color Stripe in the license. Must be between 0 and 3 inclusive.

allowPassingVideoContentToUnknownOutputenumRequired

Configures Unknown output handling settings of the license.

Allowed values:UnknownNotAllowedAllowedAllowedWithVideoConstriction

analogVideoOplintegerOptional

Specifies the output protection level for compressed digital audio.

compressedDigitalAudioOplintegerOptional

Specifies the output protection level for compressed digital audio.

compressedDigitalVideoOplintegerOptional

Specifies the output protection level for compressed digital video.

digitalVideoOnlyContentRestrictionbooleanRequired

Enables the Image Constraint For Analog Component Video Restriction in the license.

explicitAnalogTelevisionOutputRestrictionobject ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction Optional

Configures the Explicit Analog Television Output Restriction in the license. Configuration data must be between 0 and 3 inclusive.

Show 2 propertiesHide 2 properties

bestEffortbooleanRequired

Indicates whether this restriction is enforced on a Best Effort basis.

configurationDataintegerRequired0 to 3

Configures the restriction control bits. Must be between 0 and 3 inclusive.

firstPlayExpirationstringOptionalformat: duration

The amount of time that the license is valid after the license is first used to play content.

imageConstraintForAnalogComponentVideoRestrictionbooleanRequired

Enables the Image Constraint For Analog Component Video Restriction in the license.

imageConstraintForAnalogComputerMonitorRestrictionbooleanRequired

Enables the Image Constraint For Analog Component Video Restriction in the license.

scmsRestrictionintegerOptional0 to 3

Configures the Serial Copy Management System (SCMS) in the license. Must be between 0 and 3 inclusive.

uncompressedDigitalAudioOplintegerOptional

Specifies the output protection level for uncompressed digital audio.

uncompressedDigitalVideoOplintegerOptional

Specifies the output protection level for uncompressed digital video.

relativeBeginDatestringOptionalformat: duration

The relative begin date of license.

relativeExpirationDatestringOptionalformat: duration

The relative expiration date of license.

securityLevelenumOptional

The security level.

Allowed values:UnknownSL150SL2000SL3000

responseCustomDatastringOptional

The custom response data.

#Microsoft.Media.ContentKeyPolicyUnknownConfigurationobject ContentKeyPolicyUnknownConfiguration

Represents a ContentKeyPolicyConfiguration that is unavailable in the current API version.

@odata.typestringRequired

The discriminator for derived types.

#Microsoft.Media.ContentKeyPolicyWidevineConfigurationobject ContentKeyPolicyWidevineConfiguration

Specifies a configuration for Widevine licenses.

@odata.typestringRequired

The discriminator for derived types.

widevineTemplatestringRequired

The Widevine template.

namestringOptional

The Policy Option description.

policyOptionIdstringOptionalformat: uuid

The legacy Policy Option ID.

restrictionobjectRequired

The requirements that must be met to deliver keys with this configuration

Show 3 variantsHide 3 variants

Discriminated by @odata.type. Select one variant:

#Microsoft.Media.ContentKeyPolicyOpenRestrictionobject ContentKeyPolicyOpenRestriction

Represents an open restriction. License or key will be delivered on every request.

@odata.typestringRequired

The discriminator for derived types.

#Microsoft.Media.ContentKeyPolicyTokenRestrictionobject ContentKeyPolicyTokenRestriction

Represents a token restriction. Provided token must match these requirements for successful license or key delivery.

@odata.typestringRequired

The discriminator for derived types.

alternateVerificationKeyslist of objectsOptional

A list of alternative verification keys.

Show 3 variantsHide 3 variants

Discriminated by @odata.type. Select one variant:

#Microsoft.Media.ContentKeyPolicyRsaTokenKeyobject ContentKeyPolicyRsaTokenKey

Specifies a RSA key for token validation

@odata.typestringRequired

The discriminator for derived types.

exponentstring or nullRequiredformat: byte

The RSA Parameter exponent

modulusstring or nullRequiredformat: byte

The RSA Parameter modulus

#Microsoft.Media.ContentKeyPolicySymmetricTokenKeyobject ContentKeyPolicySymmetricTokenKey

Specifies a symmetric key for token validation.

@odata.typestringRequired

The discriminator for derived types.

keyValuestring or nullRequiredformat: byte

The key value of the key

#Microsoft.Media.ContentKeyPolicyX509CertificateTokenKeyobject ContentKeyPolicyX509CertificateTokenKey

Specifies a certificate for token validation.

@odata.typestringRequired

The discriminator for derived types.

rawBodystring or nullRequiredformat: byte

The raw data field of a certificate in PKCS 12 format (X509Certificate2 in .NET)

audiencestringRequired

The audience for the token.

issuerstringRequired

The token issuer.

openIdConnectDiscoveryDocumentstringOptional

The OpenID connect discovery document.

primaryVerificationKeyobject or nullRequired

The primary verification key.

Show 3 variantsHide 3 variants

Discriminated by @odata.type. Select one variant:

Specifies a RSA key for token validation

@odata.typestringRequired

The discriminator for derived types.

exponentstring or nullRequiredformat: byte

The RSA Parameter exponent

modulusstring or nullRequiredformat: byte

The RSA Parameter modulus

Specifies a symmetric key for token validation.

@odata.typestringRequired

The discriminator for derived types.

keyValuestring or nullRequiredformat: byte

The key value of the key

Specifies a certificate for token validation.

@odata.typestringRequired

The discriminator for derived types.

rawBodystring or nullRequiredformat: byte

The raw data field of a certificate in PKCS 12 format (X509Certificate2 in .NET)

requiredClaimslist of objects ContentKeyPolicyTokenClaim Optional

A list of required token claims.

Show 2 propertiesHide 2 properties

claimTypestringOptional

Token claim type.

claimValuestringOptional

Token claim value.

restrictionTokenTypeenumRequired

The type of token.

Allowed values:UnknownSwtJwt

#Microsoft.Media.ContentKeyPolicyUnknownRestrictionobject ContentKeyPolicyUnknownRestriction

Represents a ContentKeyPolicyRestriction that is unavailable in the current API version.

@odata.typestringRequired

The discriminator for derived types.

policyIdstringOptionalformat: uuid

The legacy Policy ID.

systemDataobject SystemDataSchema Optional

Metadata pertaining to creation and last modification of the resource.

Show 7 propertiesHide 7 properties

createdAtstringRequiredformat: date-time

The timestamp of resource creation (UTC).

createdBystringRequired

The identity that created the resource.

createdByTypeenumRequired

The type of identity that created the resource.

Allowed values:UserApplicationManagedIdentityKey

internalIdstringRequiredformat: uuid

The internal ID of the resource.

lastModifiedAtstringRequiredformat: date-time

The timestamp of resource last modification (UTC).

lastModifiedBystringRequired

The identity that last modified the resource.

lastModifiedByTypeenumRequired

The type of identity that last modified the resource.

Allowed values:UserApplicationManagedIdentityKey

Errors

400Bad Request

errorobject ErrorDetail Required

Pertinent information about the error

Show 3 propertiesHide 3 properties

codestringRequired

The error code.

detailstringRequired

The error message.

extraDetailmap from strings to anyOptional

Extra information regarding this error.

Show value schemaHide value schema

[any key]any

refstringRequired

A reference to the request that caused the error.

statusintegerRequired

The HTTP status code

401Unauthorized

errorobject ErrorDetail Required

Pertinent information about the error

Show 3 propertiesHide 3 properties

codestringRequired

The error code.

detailstringRequired

The error message.

extraDetailmap from strings to anyOptional

Extra information regarding this error.

Show value schemaHide value schema

[any key]any

refstringRequired

A reference to the request that caused the error.

statusintegerRequired

The HTTP status code

403Forbidden

errorobject ErrorDetail Required

Pertinent information about the error

Show 3 propertiesHide 3 properties

codestringRequired

The error code.

detailstringRequired

The error message.

extraDetailmap from strings to anyOptional

Extra information regarding this error.

Show value schemaHide value schema

[any key]any

refstringRequired

A reference to the request that caused the error.

statusintegerRequired

The HTTP status code

404Not Found

errorobject ErrorDetail Required

Pertinent information about the error

Show 3 propertiesHide 3 properties

codestringRequired

The error code.

detailstringRequired

The error message.

extraDetailmap from strings to anyOptional

Extra information regarding this error.

Show value schemaHide value schema

[any key]any

refstringRequired

A reference to the request that caused the error.

statusintegerRequired

The HTTP status code

429Too Many Requests

errorobject ErrorDetail Required

Pertinent information about the error

Show 3 propertiesHide 3 properties

codestringRequired

The error code.

detailstringRequired

The error message.

extraDetailmap from strings to anyOptional

Extra information regarding this error.

Show value schemaHide value schema

[any key]any

refstringRequired

A reference to the request that caused the error.

statusintegerRequired

The HTTP status code

500Internal Server Error

errorobject ErrorDetail Required

Pertinent information about the error

Show 3 propertiesHide 3 properties

codestringRequired

The error code.

detailstringRequired

The error message.

extraDetailmap from strings to anyOptional

Extra information regarding this error.

Show value schemaHide value schema

[any key]any

refstringRequired

A reference to the request that caused the error.

statusintegerRequired

The HTTP status code