Search Docs
Loading...
Skip to content

Interface: AssetQueryData

Defines a request for querying assets

Properties#

PropertyTypeDescription
query?stringA query string used for (fuzzy) searching of labels and tags
pagenumberThe current page queried for paginated views.
tags?stringstring[]
groups?AssetGroupsQuery only these groups
excludeGroups?AssetGroupsFilter out assets with this groups
locale?stringChoose the locale of the labels and tags for localized search and filtering. For local asset sources, labels and tags are resolved using a fallback chain: requested locale → “en” → first available entry → empty default.
perPagenumberThe number of results queried. How many assets shall be returned regardless of the total number of assets available. Together with page this can be used for pagination.
sortingOrder?SortingOrderThe order to sort by if the asset source supports sorting. If set to None, the order is the same as the assets were added to the source.
sortKey?stringThe key that identifies the meta data value to sort by or ‘id’ to sort by the asset ID. If empty, the assets are sorted by the index.
sortActiveFirst?booleanSort assets that are marked as active first.
filter?AssetFilter[]Optional structured filter, AND-combined with the result of query / tags / groups / excludeGroups. The top-level array is an implicit AND of its entries. Each entry is either a property predicate ({ property, contains?, equals? }) or a logical combinator ({ and: [...] }, { or: [...] }, { not: ... }). Combinators nest. When to use filter vs tags / groups / excludeGroups: The legacy tags / groups / excludeGroups fields remain supported and are equivalent to filter predicates with equals and implicit AND. Prefer filter for anything beyond a plain include/ exclude list — case-insensitive substrings, meta.<key> matches, or / not combinators — and reach for the legacy fields only when you want their case-sensitive exact-match semantics. Malformed filters reject the returned promise with the engine’s parse-error message (e.g. "Unknown asset property '…'"). Example filter: [ { property: 'label', contains: 'Roboto' }, { property: 'meta.languages', contains: 'de' }, { not: { property: 'meta.legacy', equals: 'true' } } ]