POST api/Import/ContentKeys

Imports provided content keys.

Request Information

URI Parameters

None.

Body Parameters

The content keys to import.

Collection of ContentKeyToImport
NameDescriptionTypeAdditional information
Id

The ID of the content key. If not specified, it will be generated.

globally unique identifier

None.

Data

The content key itself.

Collection of byte

Required

Max length: 16

Min length: 16

Iv

The content key IV.

Collection of byte

Max length: 16

Min length: 16

Request Formats

application/xml, application/cpix+xml

Sample:
<?xml version="1.0" encoding="utf-8"?>
<CPIX xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:dashif:org:cpix" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:enc="http://www.w3.org/2001/04/xmlenc#" xmlns:pskc="urn:ietf:params:xml:ns:keyprov:pskc">
    <ContentKeyList>
        <ContentKey kid="d83cb192-1135-4c4e-9267-120b0d762856" explicitIV="AAAAAAAAAAAAAAAAAAAAAA==">
            <Data><pskc:Secret><pskc:PlainValue>AAAAAAAAAAAAAAAAAAAAAA==</pskc:PlainValue></pskc:Secret></Data>
        </ContentKey>
        <ContentKey kid="9d8d2d6a-ec64-40d2-ab4d-f12f17aeeeeb" explicitIV="AAAAAAAAAAAAAAAAAAAAAA==">
            <Data><pskc:Secret><pskc:PlainValue>AAAAAAAAAAAAAAAAAAAAAA==</pskc:PlainValue></pskc:Secret></Data>
        </ContentKey>
    </ContentKeyList>
</CPIX>

application/json, text/json

Sample:
[
  {
    "Id": "ddf1b2d5-4445-46c9-8564-6f5de4e6fc94",
    "Data": "QEA=",
    "Iv": "QEA="
  },
  {
    "Id": "ddf1b2d5-4445-46c9-8564-6f5de4e6fc94",
    "Data": "QEA=",
    "Iv": "QEA="
  }
]

Response Information

Resource Description

Collection of ContentKey
NameDescriptionTypeAdditional information
Id

The ID of the content key.

globally unique identifier

Required

Name

The name of the content key.

string

Max length: 256

Min length: 1

Created

The date when the content key was created (in the ISO 8601 format).

date

Required

Updated

The date when the content key was updated last time (in the ISO 8601 format).

date

None.

CreationMethod

The category of the log entry. Where: 0 is "Random"; 1 is "KeySeed"; 2 is "Import".

byte

Required

Status Codes

All HTTP status codes must be expected, but the following status codes are the most probable:

  • OK (200) - Content keys are successfully imported.
  • BadRequest (400) - Provided data is invalid.

Response Formats

application/json, text/json

Sample:
[
  {
    "Id": "07fd1500-16db-4182-b55a-82acf409c9db",
    "Name": "sample string 2",
    "Created": "2024-11-25T04:41:52.594039+00:00",
    "Updated": "2024-11-25T04:41:52.594039+00:00",
    "CreationMethod": 64
  },
  {
    "Id": "07fd1500-16db-4182-b55a-82acf409c9db",
    "Name": "sample string 2",
    "Created": "2024-11-25T04:41:52.594039+00:00",
    "Updated": "2024-11-25T04:41:52.594039+00:00",
    "CreationMethod": 64
  }
]