# List URL paths

> Media API · Streaming Locators

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

ListPaths returns the set of valid streaming paths for a given Streaming Locator. A distinct set of paths
is returned for each type of DRM configured, per the 'EnabledProtocols' property of the streaming policy.

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 | — |

## Request body

Content type: `application/json`

- `urlStyle` · enum · Optional · _Defaults to AMS_ — The style of URL associated to the streaming endpoint. Default is 'AMS'.
  - Allowed values: `AMS`, `Aquila`, `Unified`

## Example request

```bash
curl -X POST "https://app.mk.io/api/v1/projects/{project_name}/media/streamingLocators/{locator_name}/listPaths" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
  "urlStyle": "AMS"
}'
```

## Responses

### 200 — Streaming locator paths returned.

- `downloadPaths` · list of strings · **Required** — The download paths for the locator.
  - Array items (string):
- `drm` · map from strings to object · **Required** — The license acquisition URLs for configured DRM types.
  - `[any key]` · object — map of additional properties
    - `certificateUrl` · string · Optional — The URL for obtaining the streaming certificate.
    - `licenseAcquisitionUrl` · string · **Required** — The license acquisition URL for the DRM.
- `streamingPaths` · list of objects · **Required** — The streaming paths for the locator.
  - Array items (object):
    - `encryptionScheme` · enum · **Required** — The encryption scheme used for the path.
      - Allowed values: `NoEncryption`, `EnvelopeEncryption`, `CommonEncryptionCenc`, `CommonEncryptionCbcs`
    - `paths` · list of strings · **Required** — The paths for the locator.
      - Array items (string):
    - `streamingProtocol` · enum · **Required** — The streaming protocol used for the path.
      - Allowed values: `Hls`, `Dash`, `Download`, `SmoothStreaming`

Example:

```json
{
  "downloadPaths": [
    "string"
  ],
  "drm": {
    "key": {
      "certificateUrl": "string",
      "licenseAcquisitionUrl": "string"
    }
  },
  "streamingPaths": [
    {
      "encryptionScheme": "NoEncryption",
      "paths": [
        "string"
      ],
      "streamingProtocol": "Hls"
    }
  ]
}
```

### 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}/listPaths`
