Get filtered query results with the Wowza Streaming Cloud REST API

Learn how to get filtered results from REST API queries made in the Wowza Streaming Cloud™ service.

Using the filter parameter


To execute a request that returns filtered results, use the filter parameter in the query. The filter parameter restricts the data that gets returned to one or more values associated with a field.

Use the filter query parameter by sending any GET request to the /transcoders endpoint and appending the query URL with a two-part expression that specifies the field on which to filter and the logic (comparison operator) to use to filter.

Use the syntax ?filter[n][field]=value&filter[n][comparison operator]=value where n is a zero-based index.

You can use as many filters as you want, combining them with an ampersand (&). Order doesn't matter; multiple filters are additive.

Sample requests


Return only transcoders whose state is stopped:

curl -X GET -g \
-H "wsc-api-key: ${WSC_API_KEY}" \
-H "wsc-access-key: ${WSC_ACCESS_KEY}" \
"${WSC_HOST}/api/${WSC_VERSION}/transcoders/?filter[0][field]=state&filter[0][eq]=stopped"

Return all transcoders that aren't actively running (all transcoders whose state isn't started):

curl -X GET -g \
-H "wsc-api-key: ${WSC_API_KEY}" \
-H "wsc-access-key: ${WSC_ACCESS_KEY}" \
"${WSC_HOST}/api/${WSC_VERSION}/transcoders/?filter[0][field]=state&filter[0][in]=starting,resetting,stopping,stopped"

Return only transcoders that are started and have the name MyTranscoder or MyOtherTranscoder:

curl -X GET -g \
-H "wsc-api-key: ${WSC_API_KEY}" \
-H "wsc-access-key: ${WSC_ACCESS_KEY}" \
"${WSC_HOST}/api/${WSC_VERSION}/transcoders/?filter[0][field]=state&filter[0][eq]=started&filter[1][field]=name&filter[1][in]=MyTranscoder,MyOtherTranscoder"