> This page is for mk.io.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://mediakind.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://mediakind.ferndocs.com/_mcp/server.

# List Live Events

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

## Listing, Sorting and Filtering Live Events

This endpoint returns the list of live events 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/encoding/encodingType`, `properties/lastModified`, `properties/resourceState`, `updated`, `updatedBy`

### Filtering


There are two ways to filter the set of returned live events from this endpoint - the first is to use the `$filter` query parameter, the second is to use the
`$label_key` and `$label` query parameters.


The `$filter` query parameter allows for live events 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/encoding/encodingType`, `properties/lastModified`, `properties/resourceState`, `updated`, `updatedBy`, `updatedByEmail`, `updatedByName`

`$label_key` and `$label` are specific to querying live events based on their labels. Labels are a set of key-value pairs that can be used to identify live events with
any arbitrary metadata you want, specifically for the purpose of retrieving relevant subsets of live events.

### Examples:

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

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

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


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

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

`?$filter=properties/resourceState eq 'Running'` - Returns live events in the Running state.

`?$label=studio=paravalley` - Returns live events with the label `studio` set to `paravalley`.

`?$label=release-date~2023` - Returns live events with the label `release-date` set to a value that contains `2023`.

`?$label_key=studio&label_key=release-date` - Returns live events with any value set for the `studio` label and the `release-date` label.

RBAC Capability Required: `ams.liveevent.get`

Reference: https://mediakind.ferndocs.com/mkio/api/media/live-events/list-live-events

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `project_name` (string, required)

### Query parameters

- `$label_key` (string, optional) — Filters the set to the specified label key. If multiple $label_keys are specified, matching items must have all labels.
- `$label` (string, optional) — Filters the set to the specified label key/value pair. Supports equality, inequality, and inexact matching. If multiple values are provided for the same key, items matching either value will be returned.
- `$orderby` (string, optional) — Specifies the key by which the result collection should be ordered.
- `$filter` (string, optional) — Restricts the set of items returned.
- `$top` (string, optional) — 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, optional) — 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.

## Response

### 200

A list of live events

- `supplemental` (ListResponseSupplementalSchema, required) — Supplemental info
- `value` (list of LiveEventSchema, required) — A list of live events.
- `@odata.nextLink` (string, optional) — @odata.nextLink URL if the page length and number of items match.

## Errors

### 400 Bad Request Error

Bad Request

- `error` (ErrorDetail, required) — Pertinent information about the error
- `ref` (string, required) — A reference to the request that caused the error.
- `status` (integer, required) — The HTTP status code

### 401 Unauthorized Error

Unauthorized

- `error` (ErrorDetail, required) — Pertinent information about the error
- `ref` (string, required) — A reference to the request that caused the error.
- `status` (integer, required) — The HTTP status code

### 403 Forbidden Error

Forbidden

- `error` (ErrorDetail, required) — Pertinent information about the error
- `ref` (string, required) — A reference to the request that caused the error.
- `status` (integer, required) — The HTTP status code

### 404 Not Found Error

Not Found

- `error` (ErrorDetail, required) — Pertinent information about the error
- `ref` (string, required) — A reference to the request that caused the error.
- `status` (integer, required) — The HTTP status code

### 429 Too Many Requests Error

Too Many Requests

- `error` (ErrorDetail, required) — Pertinent information about the error
- `ref` (string, required) — A reference to the request that caused the error.
- `status` (integer, required) — The HTTP status code

### 500 Internal Server Error

Internal Server Error

- `error` (ErrorDetail, required) — Pertinent information about the error
- `ref` (string, required) — A reference to the request that caused the error.
- `status` (integer, required) — The HTTP status code

## Types

### ListResponseSupplementalSchema

- `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` (PaginationInfoSchema, required) — Pagination info
- `subscription` (ProjectInfoSchema, optional) — Project info

### LiveEventSchema

- `properties` (LiveEventProperties, required) — The properties of the live event.
- `tags` (map from string to string, required) — A dictionary of tags associated with the live event. Maximum number of tags: 16. Maximum length of a tag: 64 characters. For the purposes of the `$label_key` and `$label` queries this field will be checked. This field cannot be modified, only set during creation.
- `location` (string, optional) — Deprecated field. This field cannot be modified, only set during creation.
- `name` (string, optional) — The name of the resource

### ErrorDetail

- `code` (string, required) — The error code.
- `detail` (string, required) — The error message.
- `extraDetail` (map from string to any, optional) — Extra information regarding this error.

### PaginationInfoSchema

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

### ProjectInfoSchema

- `id` (string, required) — Project ID
- `name` (string, required) — Project name

### LiveEventProperties

- `encoding` (LiveEventEncoding, required) — The encoding configuration for the live event. This includes settings like encoding type and preset name. This field cannot be modified, only set during creation.
- `input` (LiveEventInput, required) — The configuration for the input of the live event. This includes settings like key frame interval duration, streaming protocol, access token, and endpoints. This field cannot be modified, only set during creation.
- `streamOptions` (list of string, required) — A list of streaming options for the live event. One of 'Default' or 'LowLatency'. Only one value permitted in the list. This field cannot be modified, only set during creation.
- `useStaticHostname` (boolean, required) — A boolean value that indicates whether a static hostname is assigned to input and preview endpoints. If not set, will default to 'false' and IP addresses will be provided. This field cannot be modified, only set during creation.
- `created` (string, optional) — The time when the live event was created.
- `crossSiteAccessPolicies` (CrossSiteAccessPolicies, optional) — The configuration for cross-site access policies. This includes the XML content of the client access policy and cross-domain policy files. This field cannot be modified, only set during creation.
- `description` (string, optional) — An optional description for the live event. This field cannot be modified, only set during creation.
- `hostnamePrefix` (string, optional) — Applied when useStaticHostname=true to specify the first part of the hostname for all input and preview addresses. This field cannot be modified, only set during creation.
- `lastModified` (string, optional) — The last time the live event was modified.
- `pipeline` (PipelineArguments, optional) — Not currently supported. AI pipeline settings
- `preview` (LiveEventPreview, optional) — The configuration for the preview of the live event. This includes settings like preview locator, streaming policy name, access control, and endpoints. This field cannot be modified, only set during creation.
- `provisioningState` (string, optional) — The current provisioning state of the resource. One of 'InProgress', 'Succeeded', or 'Failed'
- `resourceState` (enum, optional) — The current state of the resource. One of 'Stopped', 'Starting', 'Running', 'Stopping', or 'Deleting'.
  - Allowed values: `Stopped`, `Starting`, `Running`, `Stopping`, `Deleting`
- `transcriptions` (list of any, optional) — Not currently supported. Transcription settings for the live event. This field cannot be modified, only set during creation.

### LiveEventEncoding

- `encodingType` (enum, required) — Live event type. When encodingType is set to PassthroughBasic or PassthroughStandard, the service simply passes through the incoming video and audio layer(s) to the output. When encodingType is set to Standard or Premium1080p, a live encoder transcodes the incoming stream into multiple bitrates or layers
  - Allowed values: `None`, `PassthroughBasic`, `PassthroughStandard`, `Premium1080p`, `Standard`
- `keyFrameInterval` (string, optional, default: PT2S) — Use an ISO 8601 time value between 1 and 10 seconds to specify the output fragment length for the video and audio tracks of an encoding live event. For example, use PT2S to indicate 2 seconds. For the video track it also defines the key frame interval, or the length of a GoP (group of pictures). If this value is not set for an encoding live event, the fragment duration defaults to 2 seconds. The value cannot be set for pass-through live events.
- `presetName` (string, optional) — Defaults to either Default720p or Default1080p depending on encoding type. May be used to specify alternative encoding templates - contact support for assistance if your needs are complex.
- `stretchMode` (enum, optional) — Determines how aspect ratio will be preserved when there is a mismatch between the input and output aspect ratios. Autofit to pad the output. Autosize to ignore the output ratio and pick the largest dimension that fits, and None to clip the content.
  - Allowed values: `None`, `AutoSize`, `AutoFit`

### LiveEventInput

- `accessControl` (InputAccessControl, required) — Access control for live event input.
- `accessToken` (string, required) — For RTMP, a UUID in string form to uniquely identify the stream. For SRT, an arbitrary string of between 10 and 79 characters, used as the passphrase. This can be specified at creation time but cannot be updated. If omitted or null, the service will generate a unique value.
- `keyFrameIntervalDuration` (string, required) — ISO 8601 time duration of the key frame interval duration of the input. This value sets the EXT-X-TARGETDURATION property in the HLS output. For example, use PT2S to indicate 2 seconds. Leave the value empty for encoding live events.
- `timedMetadataEndpoints` (list of LiveEventTimedMetadataEndpoint, required) — The metadata endpoints for the live event.
- `endpoints` (list of LiveEventEndpoint, optional) — Populated server-side. The input endpoints for the live event.
- `streamingProtocol` (enum, optional, default: RTMP) — The input protocol for the live event. This is specified at creation time and cannot be updated.
  - Allowed values: `RTMP`, `RTMPS`, `SRT`

### CrossSiteAccessPolicies

- `clientAccessPolicy` (string, optional, nullable) — The XML content of the client access policy file. Search 'clientaccesspolicy.xml' to learn more.
- `crossDomainPolicy` (string, optional, nullable) — The XML content of the cross-domain policy file. Search 'crossdomain.xml' to learn more.

### PipelineArguments

- `name` (string, required) — The name of the AI pipeline the Transform will execute.
- `arguments` (map from string to list of ArgumentSchema, optional) — Arguments to each operation in the AI pipeline

### LiveEventPreview

- `accessControl` (PreviewAccessControl, optional) — Address-based ACLs for access to the preview.
- `alternativeMediaId` (string, optional) — Not currently supported. Will be used to support DRM license acquisition for preview content.
- `endpoints` (list of LiveEventEndpoint, optional) — Populated server-side. The endpoints that are used for previewing the live event.
- `previewLocator` (string, optional) — The ID of the locator for the preview. This is automatically generated when the live event is created, and removed when the live Event is deleted. The caller may specify a locator GUID, in which case the caller must ensure that the GUID is unique and not already used by another resource.
- `streamingPolicyName` (string, optional, default: Predefined_ClearStreamingOnly) — The name of the DRM streaming policy for the live event preview. Defaults to Predefined_ClearStreamingOnly and no other value is presently supported.

### InputAccessControl

- `ip` (IPAccessControl, required) — The IP access control for the live event inputs.

### LiveEventTimedMetadataEndpoint

- `url` (string, required)

### LiveEventEndpoint

- `protocol` (string, optional) — The streaming protocol for the endpoint. Possible values include: 'SRT', 'RTMP'.
- `url` (string, optional) — The IP address or DNS with port and protocol

### ArgumentSchema

- `name` (string, required) — The name of the argument
- `value` (any, required) — The value of the argument

### PreviewAccessControl

- `ip` (IPAccessControl, required) — The IP access control for the preview endpoint. Determines who will be able to access preview content.

### IPAccessControl

- `allow` (list of IPRange, required) — The IP ranges that will be allowed to access the preview. If empty, all IPs will be allowed.

### IPRange

- `address` (string, required) — The IP address or DNS with port or protocol
- `name` (string, required) — The name of the IP range. This is for your reference only. examples: 'everyone', 'dave's house', 'corp vpn'.
- `subnetPrefixLength` (integer, required) — The subnet prefix length (see CIDR notation).

## Examples

**Response**

```json
{
  "supplemental": {
    "count": 1,
    "kind": "string",
    "operation": "string",
    "pagination": {
      "end": 1,
      "records": 1,
      "start": 1,
      "total": 1
    },
    "subscription": {
      "id": "string",
      "name": "string"
    }
  },
  "value": [
    {
      "properties": {
        "encoding": {
          "encodingType": "None",
          "keyFrameInterval": "PT2S",
          "presetName": "string",
          "stretchMode": "None"
        },
        "input": {
          "accessControl": {
            "ip": {
              "allow": [
                {
                  "address": "string",
                  "name": "string",
                  "subnetPrefixLength": 1
                }
              ]
            }
          },
          "accessToken": "string",
          "keyFrameIntervalDuration": "string",
          "timedMetadataEndpoints": [
            {
              "url": "string"
            }
          ],
          "endpoints": [
            {
              "protocol": "string",
              "url": "string"
            }
          ],
          "streamingProtocol": "RTMP"
        },
        "streamOptions": [
          "string"
        ],
        "useStaticHostname": true,
        "created": "string",
        "crossSiteAccessPolicies": {
          "clientAccessPolicy": "string",
          "crossDomainPolicy": "string"
        },
        "description": "string",
        "hostnamePrefix": "string",
        "lastModified": "string",
        "pipeline": {
          "name": "string",
          "arguments": {
            "operation1": [
              {
                "name": "language",
                "value": "en-US"
              }
            ],
            "operation2": [
              {
                "name": "length",
                "value": "3.7m"
              }
            ]
          }
        },
        "preview": {
          "accessControl": {
            "ip": {
              "allow": [
                {
                  "address": "string",
                  "name": "string",
                  "subnetPrefixLength": 1
                }
              ]
            }
          },
          "alternativeMediaId": "string",
          "endpoints": [
            {
              "protocol": "string",
              "url": "string"
            }
          ],
          "previewLocator": "string",
          "streamingPolicyName": "Predefined_ClearStreamingOnly"
        },
        "provisioningState": "string",
        "resourceState": "Stopped",
        "transcriptions": [
          null
        ]
      },
      "tags": {},
      "location": "string",
      "name": "name"
    }
  ],
  "@odata.nextLink": "string"
}
```

**SDK Code**

```python
import requests

url = "https://app.mk.io/api/v1/projects/project_name/media/liveEvents"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://app.mk.io/api/v1/projects/project_name/media/liveEvents';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://app.mk.io/api/v1/projects/project_name/media/liveEvents"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://app.mk.io/api/v1/projects/project_name/media/liveEvents")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://app.mk.io/api/v1/projects/project_name/media/liveEvents")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.mk.io/api/v1/projects/project_name/media/liveEvents', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://app.mk.io/api/v1/projects/project_name/media/liveEvents");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://app.mk.io/api/v1/projects/project_name/media/liveEvents")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```