Contents

Retrieve an Asset’s Content Protection Key

Provide the content key for a specific protected asset.

URL

POST https://cloudextension-testservice.local/api/queues/contentProtectionKey

Header Parameters

NameTypeDescription
Accept-Language Optionalstring

The client’s current user interface language. If possible, respond with localized content for this language.

User-Agent Requiredstring

The client’s extension protocol. This is an RFC 7231-compliant string that contains the product name AppleCloudExtension and the version of the SiriKit extension library that’s running on the client.

x-applecloudextension-retry-count Optionaluint32

The number of previous requests from the client. The client omits this header on the first attempt.

x-applecloudextension-session-id Requiredstring

A session identifier to pair each request and response. Respond to requests with the value the client provides.

Response Codes

StatusReasonTypeDescription
200OK
Content-Type: application/json
ContentProtectionKeyResponse

The request is successful.

204No Content

The service is unable to provide a content key for the specified assetIdentifier.

401Unauthorized

The request requires authorization. The client can attempt to reauthorize and then retry the request.

410Gone

The request includes an expired UserActivity, which the service is unable to use to provide a content key.

Discussion

If your service implements content protection, the client requests an item’s content protection key from this endpoint after each of the following events:

  • The client receives the queue’s initial item.

  • The client preloads each subsequent item in the queue.

  • The user manually transitions to an item in the queue.

For more information on providing your service’s content protection configuration, see ExtensionConfig.Media.Queues.ContentProtectionKey.

HTTP Body

A JSON object that contains the encrypted key request and identifies the protected asset.

See Also

Content Protection