# List Streaming Locators

> Media API · Assets

```http
POST https://app.mk.io/api/v1/projects/{project_name}/media/assets/{asset_name}/listStreamingLocators
```

List Streaming Locators for Asset. This API call is a convenience method to retrieve
any and all playback configurations, or StreamingLocators, that are associated with this asset.

RBAC Capability Required: `ams.asset.create`

## Authentication

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

## Path parameters

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

## Example request

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

## Responses

### 200 — Streaming Locators

- `streamingLocators` · list of objects · **Required** — List of Streaming Locators
  - Array items (object):
    - `alternativeMediaId` · string · Optional — The alternative media id of the asset used by this streaming locator
    - `assetName` · string · **Required** — The name of the asset used by this streaming locator
    - `contentId` · string · Optional · _1-260 characters_ — Optional content ID. Only valid when an external key server is used.
    - `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
    - `defaultContentKeyPolicyName` · string · Optional · _<=260 characters_ — The default content key policy name used by this streaming locator.
    - `defaultManifestFilename` · string · Optional · _1-260 characters_ · _pattern: ^[A-Za-z0-9 _.,()-]+$_ — Manifest filename used with streaming endpoints that have urlStyle set to 'Aquila' or 'Unified'. For example: manifest.ism (for MP4 assets), manifest.mpd (for TS assets), index.qfm (for live events)
    - `endTime` · string · Optional · _format: date-time_ — The end time of the streaming locator
    - `filters` · list of strings · Optional — A list of asset or account filters to apply to the streaming locator.
      - Array items (string):
    - `provisioningState` · enum · Optional — The provisioning state of the streaming locator. Set by the system. One of InProgress, Succeeded, Failed.
      - Allowed values: `InProgress`, `Succeeded`, `Failed`
    - `resourceState` · enum · Optional — The runtime state of the streaming locator. Set by the system.
      - Allowed values: `Creating`, `Updating`, `Deleting`, `Created`, `Deleted`, `Error`
    - `startTime` · string · Optional · _format: date-time_ — The start time of the streaming locator
    - `streamingLocatorId` · string · Optional · _1-260 characters_ · _pattern: ^[^\/]+$_ — The streaming locator id
    - `streamingPolicyName` · string · **Required** · _<=260 characters_ — The name of the streaming policy used by this streaming locator. You may specify a custom policy by name, or used one of the predefined policies. To get the list of valid policy options use the `GET /api/v1/projects/{project_name}/media/streamingPolicies` endpoint.
    - `suppressed` · boolean · Optional · _Defaults to false_ — Optional configuration for output suppression. A suppressed locator will return a 404 HTTP response to requests, in the same way it would if the `startTime` had not yet been reached. The 404 code can be overridden with a different status code by setting `preAvailabilityStatusCode` in a custom catalog in a Streaming Policy.

Example:

```json
{
  "streamingLocators": [
    {
      "alternativeMediaId": "string",
      "assetName": "string",
      "contentId": "string",
      "contentKeys": [
        {
          "id": "string",
          "labelReferenceInStreamingPolicy": "string",
          "policyName": "string",
          "tracks": [
            {
              "trackSelections": [
                {
                  "operation": {
                    "Equal": "string",
                    "Unknown": "string"
                  },
                  "property": "string",
                  "value": "string"
                }
              ]
            }
          ],
          "type": "CommonEncryptionCenc",
          "value": "string"
        }
      ],
      "defaultContentKeyPolicyName": "string",
      "defaultManifestFilename": "string",
      "endTime": "2024-01-01T00:00:00Z",
      "filters": [
        "string"
      ],
      "provisioningState": "InProgress",
      "resourceState": "Creating",
      "startTime": "2024-01-01T00:00:00Z",
      "streamingLocatorId": "00000000-0000-0000-0000-000000000000",
      "streamingPolicyName": "string",
      "suppressed": false
    }
  ]
}
```

### 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/assets/{asset_name}/listStreamingLocators`
