# List Streaming Locators

Get `https://app.mk.io/api/v1/projects/:project_name/media/streamingLocators`

## Listing, Sorting and Filtering Streaming Locators

This endpoint returns the list of streaming locators 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/endTime`, `properties/startTime`, `updated`, `updatedBy`

### Filtering

The `$filter` query parameter allows for streaming locators 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/assetName`, `properties/created`, `properties/endTime`, `properties/startTime`, `updated`, `updatedBy`, `updatedByEmail`, `updatedByName`

### Examples:

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

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

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

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

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

RBAC Capability Required: `ams.streaminglocator.get`

## Authentication

Authorization Bearer

Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Path parameters

`project_name` string Required

## Query parameters

- `$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 storage accounts

`@odata.nextLink` string Optional

`@odata.nextLink` URL if the page length and number of items match.

### supplemental object [ListResponseSupplementalSchema](https://docs.mediakind.com/api-reference/media-api/schemas/listresponsesupplementalschema) Required

- `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 [PaginationInfoSchema](https://docs.mediakind.com/api-reference/media-api/schemas/paginationinfoschema) Required
  - Pagination info
- `subscription` object [ProjectInfoSchema](https://docs.mediakind.com/api-reference/media-api/schemas/projectinfoschema) Optional
  - Project info
  - `id` string Required
  - Project ID
  - `name` string Required
  - Project name
  
### `value` list of objects [StreamingLocatorSchema](https://docs.mediakind.com/api-reference/media-api/schemas/streaminglocatorschema) Required

- `id` string Optional
  - Fully qualified resource ID for the resource.
- `name` string Optional 1-260 characters pattern: ^[^\\'<>%&:\/?*+]+$
  - The name of the resource
- `properties` object [StreamingLocatorProperties](https://docs.mediakind.com/api-reference/media-api/schemas/streaminglocatorproperties) Required
  - Properties for streaming locator
    - `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 [StreamingLocatorContentKey](https://docs.mediakind.com/api-reference/media-api/schemas/streaminglocatorcontentkey) Optional
      - The content keys used by this streaming locator
    - `tracks` list of objects [StreamingLocatorTrackSelection](https://docs.mediakind.com/api-reference/media-api/schemas/streaminglocatortrackselection) Optional
      - Not currently supported. The tracks which use this 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.

### Errors

- 400 Bad Request
- 401 Unauthorized
- 403 Forbidden
- 404 Not Found
- 429 Too Many Requests
- 500 Internal Server Error
