# List Streaming Endpoints

> Media API · Streaming Endpoints

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

## Listing, Sorting and Filtering Streaming Endpoints

This endpoint returns the list of streaming endpoints 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`, `properties/resourceState`, `properties/scaleUnits`, `updated`, `updatedBy`

### Filtering

The `$filter` query parameter allows for streaming endpoints 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`, `properties/resourceState`, `properties/scaleUnits`, `updated`, `updatedBy`, `updatedByEmail`, `updatedByName`

### Examples:

`?$top=10` - Returns only the first 10 streaming endpoints from the list.

`?$orderby=name desc` - Sorts streaming endpoints by name in descending order.

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

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

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

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

RBAC Capability Required: `ams.streamingendpoint.get`

## Authentication

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

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `project_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/streamingEndpoints" \
  -H "Authorization: Bearer <token>"
```

## Responses

### 200 — A list of Streaming Endpoints.

- `@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 streaming endpoints
  - Array items (object):
    - `location` · string · **Required** — The name of the location in which the streaming endpoint is located. This field must match the location in which the user's subscription is provisioned.
    - `name` · string · Optional · _1-64 characters_ · _pattern: ^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$_ — The name of the resource
    - `properties` · object · **Required** — The properties of the streaming endpoint.
      - `accessControl` · object · Optional — The access control settings for the streaming endpoint.
        - `akamai` · object · Optional · **Deprecated** — DEPRECATED: This is provided for backwards compatibility and will be removed in a future release. Akamai access control configuration for the streaming endpoint. If the Akamai CDN profile is specified and CDN is enabled, this field is required.
          - `akamaiSignatureHeaderAuthenticationKeyList` · list of objects · **Required** · **Deprecated** — DEPRECATED: This is provided for backwards compatibility and will be removed in a future release. The Akamai access control configuration for the streaming endpoint. Learn more: https://techdocs.akamai.com/netstorage-usage/reference/example-authentication-headers
            - Array items (object):
              - `base64Key` · string · Optional
              - `expiration` · string · Optional
              - `identifier` · string · Optional
        - `ip` · object · Optional — IP-based access control configuration for the streaming endpoint. If omitted, this will default to 0.0.0.0/0
          - `allow` · list of objects · **Required** — The IP allow list.
            - Array items (object):
              - `address` · string · **Required**
              - `name` · string · Optional · _Defaults to _ — The name of the IP ACL.
              - `subnetPrefixLength` · integer · Optional · _0 to 32_ · _Defaults to 32_ — The subnet prefix length (see CIDR notation).
      - `advancedSettingsName` · string or null · Optional · _<=64 characters_ — Name of the advanced settings configuration to apply to this streaming endpoint. These configuration blocks are managed by MediaKind and you should not set this field unless MediaKind support has asked you to.
      - `cdnBasePath` · string · Optional — If CDN is enabled, the path that must be inserted after the hostname and before the locator, e.g. https://<hostName><cdnBasePath><locator>.
      - `cdnEnabled` · boolean · Optional · _Defaults to false_ — Indicates if CDN is enabled for the streaming endpoint.
      - `cdnProfile` · string · Optional · _<=100 characters_ — If CDN is enabled, the optional CDN profile name for the streaming endpoint.
      - `cdnProvider` · enum · Optional · **Deprecated** — DEPRECATED: CDN provider is set by default when CDN is enabled. Value will be ignored if provided. This is provided for backwards compatibility and will be removed in a future release.
        - Allowed values: `StandardAkamai`
      - `created` · string · Optional · _format: date-time_ — The creation date and time of the streaming endpoint. Set by the system.
      - `crossSiteAccessPolicies` · object · Optional — Cross-site access policies are CDN policies for Smooth or DASH streaming that determine which domains clients are permitted to playback content from.
        - `clientAccessPolicy` · string or null · Optional — The XML content of the client access policy file. Search 'clientaccesspolicy.xml' to learn more.
        - `crossDomainPolicy` · string or null · Optional — The XML content of the cross-domain policy file. Search 'crossdomain.xml' to learn more.
      - `customHostNames` · list of strings · Optional — NOT SUPPORTED pending implementation of DNS validation. Custom host names for the streaming endpoint. Must be unique within the region. If not specified, a default hostname will be used. The best practice for custom DNS is to use a CNAME pointing to the autogenerated hostname derived from the streaming endpoint name, and to configure your CDN to deliver a HOST header to the origin server for routing purposes.
        - Array items (string):
      - `description` · string or null · Optional · _<=1024 characters_ — The description of the streaming endpoint.
      - `hostName` · string · Optional — The fqdn of the streaming endpoint. This is the output hostname and is always configured. To set a custom hostname, use the customHostNames property.
      - `lastModified` · string · Optional · _format: date-time_ — The last modified date and time of the streaming endpoint. Set by the system.
      - `maxCacheAge` · integer · Optional · _0 to 2592000_ · _Defaults to 86400_ — The maximum amount of time that segments will be cached, in seconds. This value is superseded by any ETAG values set by the infrastructure.
      - `maxManifestCacheAge` · integer · Optional · _0 to 2592000_ · _Defaults to 60_ — The maximum amount of time that closed manifests will be cached, in seconds. This value is superseded by any ETAG values set by the infrastructure.
      - `provisioningState` · enum · Optional — The provisioning state of the streaming endpoint. Set by the system. One of InProgress,Succeeded,Failed.
        - Allowed values: `InProgress`, `Succeeded`, `Failed`
      - `publicName` · string · Optional · _3-63 characters_ · _pattern: ^[a-z0-9]+(-[a-z0-9]+)*$_ — Public name for the streaming endpoint
      - `resourceState` · enum · Optional — The runtime state of the streaming endpoint. Set by the system.
        - Allowed values: `Creating`, `Updating`, `Scaling`, `Starting`, `Stopping`, `Restarting`, `Deleting`, `Running`, `Stopped`, `Deleted`
      - `scaleUnits` · integer · **Required** · _>=0_ — The number of scale units for the streaming endpoint. This will determine your minimum scale. A value of 0 will result in the streaming endpoints using a Standard SKU. A value greater than zero indicates that the 'Premium' SKUs will be provisioned.
      - `serverCredentialNames` · list of strings · Optional — Names of the server credentials to use for endpoint protection. Only basic authentication is supported. Not supported if CDN is enabled.
        - Array items (string):
      - `shieldCache` · object · Optional — Shield cache configuration for the streaming endpoint.
        - `scaleUnits` · integer or null · **Required** · _0 to 1024_ — The number of scale units for the shield cache. A value of 0 indicates that no shield cache will be deployed. This feature should only be used if advised by MediaKind. It is controlled by a feature flag.
      - `sku` · object · Optional — The SKU definition for the streaming endpoint.
        - `capacity` · integer · Optional — This is the bandwidth capacity of current streaming unit configuration
        - `name` · enum · **Required** — The name of the SKU. Will default to 'Standard' if the sku configuration is not provided.
          - Allowed values: `Standard`, `Premium`
      - `urlStyle` · string · Optional — The style of URL associated with the streaming endpoint. The default is 'AMS' and you should only use any other value if advised to by MediaKind
    - `tags` · map from strings to string · Optional — A dictionary of key:value pairs describing the resource. Search may be implemented against tags in the future.
      - `[any key]` · string — map of additional properties

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": [
    {
      "location": "string",
      "name": "name",
      "properties": {
        "accessControl": {
          "akamai": {
            "akamaiSignatureHeaderAuthenticationKeyList": [
              {
                "base64Key": "string",
                "expiration": "string",
                "identifier": "string"
              }
            ]
          },
          "ip": {
            "allow": [
              {
                "address": "string",
                "name": "",
                "subnetPrefixLength": 32
              }
            ]
          }
        },
        "advancedSettingsName": "string",
        "cdnBasePath": "string",
        "cdnEnabled": false,
        "cdnProfile": "string",
        "cdnProvider": "StandardAkamai",
        "created": "2024-01-01T00:00:00Z",
        "crossSiteAccessPolicies": {
          "clientAccessPolicy": "string",
          "crossDomainPolicy": "string"
        },
        "customHostNames": [
          "string"
        ],
        "description": "string",
        "hostName": "string",
        "lastModified": "2024-01-01T00:00:00Z",
        "maxCacheAge": 86400,
        "maxManifestCacheAge": 60,
        "provisioningState": "InProgress",
        "publicName": "string",
        "resourceState": "Creating",
        "scaleUnits": 0,
        "serverCredentialNames": [
          "string"
        ],
        "shieldCache": {
          "scaleUnits": 0
        },
        "sku": {
          "capacity": 0,
          "name": "Standard"
        },
        "urlStyle": "string"
      },
      "tags": {
        "key": "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/streamingEndpoints`
