# List Content Keys

> Media API · Streaming Locators

```http
POST https://app.mk.io/api/v1/projects/{project_name}/media/streamingLocators/{locator_name}/listContentKeys
```

List Content Keys used by this Streaming Locator

RBAC Capability Required: `ams.streaminglocator.create`

## Authentication

- `Authorization` header — Bearer authentication of the form `Bearer <token>`.

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `project_name` | string | Yes | — |
| `locator_name` | string | Yes | — |

## Example request

```bash
curl -X POST "https://app.mk.io/api/v1/projects/{project_name}/media/streamingLocators/{locator_name}/listContentKeys" \
  -H "Authorization: Bearer <token>"
```

## Responses

### 200 — Content Keys used by this Streaming Locator.

- `contentKeys` · list of objects · Optional — The content keys used by this streaming locator
  - Array items (object):
    - `id` · string · **Required** — The id of the content key
    - `labelReferenceInStreamingPolicy` · string · Optional — The label reference in the streaming policy
    - `policyName` · string · Optional — The name of the policy
    - `tracks` · list of objects · Optional — Not currently supported. The tracks which use this content key
      - Array items (object):
        - `trackSelections` · list of objects · **Required** — The track selections
          - Array items (object):
            - `operation` · object · **Required** — The track property comparison operation
              - `Equal` · string · **Required** — The track property comparison operation
              - `Unknown` · string · **Required** — The track property comparison operation
            - `property` · string · **Required** — The track property to compare against
            - `value` · string · **Required** — The track property value.
    - `type` · enum · Optional — The streaming locator content key type
      - Allowed values: `CommonEncryptionCenc`, `CommonEncryptionCbcs`, `EnvelopeEncryption`
    - `value` · string · Optional — The value of the content key

Example:

```json
{
  "contentKeys": [
    {
      "id": "string",
      "labelReferenceInStreamingPolicy": "string",
      "policyName": "string",
      "tracks": [
        {
          "trackSelections": [
            {
              "operation": {
                "Equal": "string",
                "Unknown": "string"
              },
              "property": "string",
              "value": "string"
            }
          ]
        }
      ],
      "type": "CommonEncryptionCenc",
      "value": "string"
    }
  ]
}
```

### 400 — Bad Request

- `error` · object · **Required** — Pertinent information about the error
  - `code` · string · **Required** — The error code.
  - `detail` · string · **Required** — The error message.
  - `extraDetail` · map from strings to any · Optional — Extra information regarding this error.
    - `[any key]` · any — map of additional properties
- `ref` · string · **Required** — A reference to the request that caused the error.
- `status` · integer · **Required** — The HTTP status code

Example:

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

### 401 — Unauthorized

- `error` · object · **Required** — Pertinent information about the error
  - `code` · string · **Required** — The error code.
  - `detail` · string · **Required** — The error message.
  - `extraDetail` · map from strings to any · Optional — Extra information regarding this error.
    - `[any key]` · any — map of additional properties
- `ref` · string · **Required** — A reference to the request that caused the error.
- `status` · integer · **Required** — The HTTP status code

Example:

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

### 403 — Forbidden

- `error` · object · **Required** — Pertinent information about the error
  - `code` · string · **Required** — The error code.
  - `detail` · string · **Required** — The error message.
  - `extraDetail` · map from strings to any · Optional — Extra information regarding this error.
    - `[any key]` · any — map of additional properties
- `ref` · string · **Required** — A reference to the request that caused the error.
- `status` · integer · **Required** — The HTTP status code

Example:

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

### 404 — Not Found

- `error` · object · **Required** — Pertinent information about the error
  - `code` · string · **Required** — The error code.
  - `detail` · string · **Required** — The error message.
  - `extraDetail` · map from strings to any · Optional — Extra information regarding this error.
    - `[any key]` · any — map of additional properties
- `ref` · string · **Required** — A reference to the request that caused the error.
- `status` · integer · **Required** — The HTTP status code

Example:

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

### 429 — Too Many Requests

- `error` · object · **Required** — Pertinent information about the error
  - `code` · string · **Required** — The error code.
  - `detail` · string · **Required** — The error message.
  - `extraDetail` · map from strings to any · Optional — Extra information regarding this error.
    - `[any key]` · any — map of additional properties
- `ref` · string · **Required** — A reference to the request that caused the error.
- `status` · integer · **Required** — The HTTP status code

Example:

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

### 500 — Internal Server Error

- `error` · object · **Required** — Pertinent information about the error
  - `code` · string · **Required** — The error code.
  - `detail` · string · **Required** — The error message.
  - `extraDetail` · map from strings to any · Optional — Extra information regarding this error.
    - `[any key]` · any — map of additional properties
- `ref` · string · **Required** — A reference to the request that caused the error.
- `status` · integer · **Required** — The HTTP status code

Example:

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

---

Source spec: `media-api` · operationId: `[post]_/api/v1/projects/{project_name}/media/streamingLocators/{locator_name}/listContentKeys`
