create.md

Create

Media API · Content Key Policies

PUT https://app.mk.io/api/v1/projects/{project_name}/media/contentKeyPolicies/{policy_name}

Create a Content Key Policy

RBAC Capability Required: ams.contentkeypolicy.create

Authentication

Path parameters

Name Type Required Description
project_name string Yes
policy_name string Yes

Request body

Content type: application/json

Example:

{
  "id": "string",
  "name": "name",
  "properties": {
    "created": "2024-01-01T00:00:00Z",
    "description": "string",
    "fairPlayAmsCompatibility": true,
    "lastModified": "2024-01-01T00:00:00Z",
    "options": [
      {
        "configuration": {
          "@odata.type": "#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration"
        },
        "name": "string",
        "policyOptionId": "00000000-0000-0000-0000-000000000000",
        "restriction": {
          "@odata.type": "#Microsoft.Media.ContentKeyPolicyOpenRestriction"
        }
      }
    ],
    "policyId": "00000000-0000-0000-0000-000000000000"
  },
  "systemData": {
    "createdAt": "2024-01-01T00:00:00Z",
    "createdBy": "string",
    "createdByType": "User",
    "internalId": "00000000-0000-0000-0000-000000000000",
    "lastModifiedAt": "2024-01-01T00:00:00Z",
    "lastModifiedBy": "string",
    "lastModifiedByType": "User"
  },
  "type": "string"
}

400 — Bad Request

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

401 — Unauthorized

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

403 — Forbidden

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

404 — Not Found

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

409 — Conflict

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

429 — Too Many Requests

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

500 — Internal Server Error

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}