# List Live Outputs

> Media API · Live Outputs

```http
GET https://app.mk.io/api/v1/projects/{project_name}/media/liveEvents/{event_name}/liveOutputs
```

## Listing, Sorting and Filtering Live Outputs

This endpoint returns the list of live outputs in the specified project.

### Sorting

The results from this endpoint can be ordered using the `$orderby` query parameter. Specify a list of field names, separated by commas
where each one can optionally specify `asc` or `desc`.

Sorting is valid on the following fields: `created`, `createdBy`, `id`, `name`, `properties/created`, `properties/description`, `properties/lastModified`, `updated`, `updatedBy`

### Filtering

The `$filter` query parameter allows for live outputs to be filtered on the basis of fields in the schema using OData query syntax.
See [this document](https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#filter) for more details on the syntax used.

Filters are valid on the following fields: `created`, `createdBy`, `createdByEmail`, `createdByName`, `id`, `name`, `properties/created`, `properties/description`, `properties/lastModified`, `updated`, `updatedBy`, `updatedByEmail`, `updatedByName`

### Examples:

`?$top=10` - Returns only the first 10 live outputs from the list.

`?$orderby=name desc` - Sorts live outputs by name in descending order.

`?$filter=name eq 'descriptive name'` - Returns live outputs that match the provided name.

`?$orderby=created desc` - Sorts live outputs by creation date in descending order.

`?$filter=created ge 2021-01-01T00:00:00Z` - Returns live outputs created after January 1, 2021.

RBAC Capability Required: `ams.liveeventoutput.get`

## Authentication

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

## Path parameters

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

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `$orderby` | string | No | Specifies the key by which the result collection should be ordered. |
| `$filter` | string | No | Restricts the set of items returned. |
| `$top` | string | No | Specifies a non-negative integer `n` that limits the number of items returned from a collection. The service returns the number of available items up to but not greater than the specified value `n`. |
| `$skiptoken` | string | No | Specifies a start offset to support paginated results. Use `@odata.nextLink` in the result object to enumerate the collection - it will be present only if there's more than one page of entities. |

## Example request

```bash
curl -X GET "https://app.mk.io/api/v1/projects/{project_name}/media/liveEvents/{event_name}/liveOutputs" \
  -H "Authorization: Bearer <token>"
```

## Responses

### 200 — List of live outputs

- `@odata.nextLink` · string · Optional — @odata.nextLink URL if the page length and number of items match.
- `supplemental` · object · **Required** — Supplemental info
  - `count` · integer · **Required** — Number of items returned
  - `kind` · string · **Required** — Type of items in the list
  - `operation` · string · **Required** — Operation type. Should always say 'list'
  - `pagination` · object · **Required** — Pagination info
    - `end` · integer · **Required** — Position of the last item in the list
    - `records` · integer · **Required** — Total number of items returned in the list
    - `start` · integer · **Required** — Position of the first item in the list
    - `total` · integer · **Required** — Total number of items in the project
  - `subscription` · object · Optional — Project info
    - `id` · string · **Required** — Project ID
    - `name` · string · **Required** — Project name
- `value` · list of objects · **Required** — A list of Live Outputs
  - Array items (object):
    - `name` · string · Optional · _1-256 characters_ · _pattern: ^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$_ — The name of the resource
    - `properties` · object · **Required** — The properties of the live output.
      - `archiveWindowLength` · string · **Required** — ISO 8601 timespan duration of the archive window length. This is duration that customer want to retain the recorded content.
      - `assetName` · string · **Required** · _1-260 characters_ — The name of the asset that the live output will write to.
      - `created` · string · Optional — The exact time the live output was created.
      - `description` · string · Optional · _0-4096 characters_ — The description of the live output.
      - `hls` · object · Optional — The HLS configuration.
        - `fragmentsPerTsSegment` · integer · Optional · _1 to 100000000_ · _Defaults to 1_ — The number of fragments per HLS segment.
      - `lastModified` · string · Optional — The exact time the live output was last modified.
      - `manifestName` · string · Optional · _1-64 characters_ · _pattern: ^[a-zA-Z0-9\-]+[a-zA-Z0-9]$_ — The name of the manifest file. If not provided, the service will generate one automatically. This is the filename that will appear in playback URLs.
      - `outputSnapTime` · integer · Optional · _Defaults to 0_ — Not supported. The output snapshot time. This is the wall clock time, in unix epoch seconds, that the live output will begin recording from.
      - `provisioningState` · string · Optional — The provisioning state of the live output.
      - `resourceState` · enum · Optional — The resource state of the live output.
        - Allowed values: `Creating`, `Deleting`, `Running`
      - `rewindWindowLength` · string · Optional — Not supported. ISO 8601 timespan duration of the rewind window length during live playback. This is the amount of time that the live output will be able to rewind.

Example:

```json
{
  "@odata.nextLink": "string",
  "supplemental": {
    "count": 0,
    "kind": "string",
    "operation": "string",
    "pagination": {
      "end": 0,
      "records": 0,
      "start": 0,
      "total": 0
    },
    "subscription": {
      "id": "string",
      "name": "string"
    }
  },
  "value": [
    {
      "name": "name",
      "properties": {
        "archiveWindowLength": "string",
        "assetName": "string",
        "created": "string",
        "description": "string",
        "hls": {
          "fragmentsPerTsSegment": 1
        },
        "lastModified": "string",
        "manifestName": "name",
        "outputSnapTime": 0,
        "provisioningState": "string",
        "resourceState": "Creating",
        "rewindWindowLength": "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: `[get]_/api/v1/projects/{project_name}/media/liveEvents/{event_name}/liveOutputs`
