In requests that can respond with potentially large collections, such as the collection returned by https://video.qbrick.com/api/v1/accounts/{accountId}/medias?limit=30&offset=60, the results will be paginated to 200 items by default. You can use the offset parameter to specify which collection of data to retrieve. You can use limit parameter to set custom collection sizes on the API responses. API responses return pre-built pagination links with rels first, prev, next and last and client applications are encouraged to follow these links for pagination.
Paginated results can be sorted according to one of more criteria using the sort param. Clients can specify sort criteria as a comma-separated list of the names of fields that should be used to sort. The default sort order is ascending. https://video.qbrick.com/api/v1/accounts/{accountId}/medias?sort=relevance+desc
To request a partial response, use the fields request parameter to specify the fields you want returned. You can use this parameter with any request that returns a response body. The format of the fields request parameter value is loosely based on XPath syntax.
https://video.qbrick.com/api/v1/accounts/{accountId}/medias?fields=*(asset/resources/*/renditions/*/links)
The supported syntax is summarized below.
You can easily search for any information in the Library. All GET requests allows a q parameter where you specify your search criteria.
These criteria and filters can be combined to perform complex queries.
https://video.qbrick.com/api/v1/accounts/{accountId}/medias?q=*alice* bob created:[2020-03-01 TO 2020-04-01] id:*234* !catalog.id:* metadata.description:s* !asset.resources.type:subtitle asset.resources.type:video
For example, the above request will return all media that:
Query | Short notation | Description | |
---|---|---|---|
Terms | q=alice | Exact term anywhere | |
q=alice OR bob | q=alice bob | Either term anywhere | |
q=\"alice bob\" | Exact phrase anywhere | ||
Fields | q=metadata.title:alice | Exact term in the field | |
q=metadata.title:\"alice bob\" | Exact phrase in the field | ||
q=catalog:id:* | Contained in a catalog | ||
Wildcards | q=ali* | Starting with, anywhere | |
q=al?ce | One character wildcard | ||
q=metadata.title:*alice* | Anywhere in terms in the field | ||
Ranges | q=created:[2019-01-01 TO 2020-01-01] | Creation date window | |
q=updated:{2019-01-01 TO 2020-01-01} | Exclusive update date window | ||
q=created:[2019-01-01 TO ] | Created after | ||
q=updated:[ TO 2019-01-01] | Updated before | ||
Boost | q=metadata.title:alice^2 | Only applied when sorting by relevance, boosted fields will appear first in the results | |
q=metadata.title:\"alice bob\"^2 | |||
Booleans | q=metadata.title:alice OR metadata.title:bob | q=metadata.title:alice || metadata.title:bob | OR is the default operator for search terms and can be omitted |
q=metadata.title:alice AND metadata.title:alice | q=metadata.title:alice && metadata.title:alice | AND is the default operator for filters and can be omitted | |
q=metadata.title:alice OR metadata.title:bob AND metadata.title:carol | q=metadata.title:alice || metadata.title:bob && metadata.title:carol | Complex query with booleans, not recommended | |
q=alice OR bob AND id:234 | q=alice bob id:234 | 'alice' and 'bob' are search criteria, 'id:' is a filter ; AND and OR can be omitted since they are default operators | |
Restrictions | q=NOT metadata.title:alice | q=!metadata.title:alice | Exact restricted term in a field |
q=NOT catalog.id:* | q=!catalog.id:* | Not cataloged | |
Groups | q=(metadata.title:alice OR metadata.title:bob) AND metadata.title:carol | Explicit operator hierarchy | |
q=metadata.title:(alice OR bob AND carol) | Grouped values on the same field |