Support for List Query Parameters in GET List Requests
Starting from version 3.3, our scripts support query parameters for GET requests. This allows you to filter, select, sort, limit and skip the results directly from the URL.
These parameters can be used with:
/api/shows/api/profiles/api/pages/api/playlistsetc.
GET /api/shows - list all shows
Supported Query Parameters
| Parameter | Description | Example |
|---|---|---|
| filter | Filters the results based on field values. Use the format: key:value. Multiple filters are comma-separated. Supports string and regex filters. |
filter=name:Test,path=/^STUDIO1/i |
| select | Specifies which fields to return. Separate multiple fields with commas. | select=name,enabled |
| sort | Sorts the results by a field. Use :1 for ascending, :-1 for descending. |
sort=name:1 |
| limit | Limits the number of returned results. | limit=1 |
| skip | Skips N results. | skip=10 |
Detailed Examples per Parameter
Filter
| Example | Description |
|---|---|
/api/shows?filter=path:/ |
list only shows that has the "path" / |
/api/shows?filter=name:NFL_UNREAL_2023,path:/ |
list only shows that has the "name" NFL_UNREAL_2023 and "path" / |
Select
| Example | Description |
|---|---|
/api/shows?select=name:1 |
list all shows but selects only "name" field |
/api/shows?select=name |
list all shows but selects only "name" field |
/api/shows?select=name,path |
list all shows but selects only "name" and "path" fields |
/api/shows?select=name:0 |
list all shows but selects every field except "name" field |
Sort
| Example | Description |
|---|---|
/api/shows?sort=name:1 |
list all shows and sort them by name ASC |
/api/shows?sort=name:-1 |
list all shows and sort them by name DESC |
Skip
| Example | Description |
|---|---|
/api/shows?skip=1 |
list all shows but skips 1 |
/api/shows?skip=100 |
list all shows but skips 100 |
Limit
| Example | Description |
|---|---|
/api/shows?limit=1 |
list all shows but with the limit (currently will return only one show because the limit is 1) |
Combined Examples
-
Get one show with the name
TestShowNamesorted by name, returning only the name field: GET/api/shows?filter=name:TestShowName&select=name&sort=name:1&limit=1 -
Get all shows with name
TestShowNameand path starting withSTUDIO1, sorted by name: GET/api/shows?filter=name:TestShowName,path=/^STUDIO1/i&sort=name:1 -
Get only the
nameandenabledfields of all shows: GET/api/shows?select=name,enabled