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": "3c51ce53-69f6-456e-a316-51b42d3f5c31",
    "Data": "QEA=",
    "Iv": "QEA="
  },
  {
    "Id": "3c51ce53-69f6-456e-a316-51b42d3f5c31",
    "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": "45e0b408-cdef-4b39-b69b-dda7bc3b4b94",
    "Name": "sample string 2",
    "Created": "2024-09-24T02:26:19.5786601+00:00",
    "Updated": "2024-09-24T02:26:19.5786601+00:00",
    "CreationMethod": 64
  },
  {
    "Id": "45e0b408-cdef-4b39-b69b-dda7bc3b4b94",
    "Name": "sample string 2",
    "Created": "2024-09-24T02:26:19.5786601+00:00",
    "Updated": "2024-09-24T02:26:19.5786601+00:00",
    "CreationMethod": 64
  }
]