POST api/ContentKeys

Creates a new content key.

Request Information

URI Parameters

None.

Body Parameters

Data to use for the new content key.

NewContentKey
NameDescriptionTypeAdditional information
Id

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

globally unique identifier

None.

Name

The name of the content key.

string

Max length: 256

Min length: 1

KeySeedId

The ID of the key seed that will be used to generate the content key. If not specified, the cryptographically secure random number generator will be used to generate the content key.

globally unique identifier

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": "f3dd62f7-3d78-4398-8b82-dcfb1f63c753",
  "Name": "sample string 1",
  "KeySeedId": "a3a00162-316c-4b65-a90e-500319b80050"
}

Response Information

Resource Description

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:

  • Created (201) - The content key is successfully added.
  • BadRequest (400) - The data for a new content key is invalid.

Response Formats

application/json, text/json

Sample:
{
  "Id": "58766c8e-6331-4974-b708-2f96494a7529",
  "Name": "sample string 2",
  "Created": "2024-09-24T02:15:15.6052133+00:00",
  "Updated": "2024-09-24T02:15:15.6052133+00:00",
  "CreationMethod": 64
}