Qurey Media Service Assets Or Streaming Locators

Abdelrahman Tawfiq 21 Reputation points
2022-07-19T11:53:34.223+00:00

Hello there,

I want to get a locator by id but so I appended this Odata filter query to api properties/streamingLocatorId eq 6ef0ae17-df85-4777-bd94-d6be5571e650

but I got a response error with Filter by 'properties/streamingLocatorId' is not allowed

do i have to enable it or its not allowed at all.

Same for getting an asset with first part of its name, i uses this OData filter startswith(name, 'value')
I got a response error with Function startswith is not allowed

Community Center | Not monitored
0 comments No comments
{count} votes

Accepted answer
  1. John Deutscher (MSFT) 2,126 Reputation points
    2022-07-19T16:44:26.757+00:00

    Checking the documentation on Filtering, it looks like we limit the filtering of Streaming Locators to the following properties in v3 API.

    https://learn.microsoft.com/en-us/azure/media-services/latest/filter-order-page-entities-how-to

    • name
    • properties/created
    • properties/endTime

    Looks like the name would work for you, as name is unique ID in the v3 API.

    Try the same query with "name"

    let findByName = name eq ${locatorName};

    See sample code here - https://github.com/Azure-Samples/media-services-v3-node-tutorials/blob/main/Assets/list-streamingLocators-filtered.ts


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.