This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Creates a query to retrieve a list of resources.
The queryResources()
function builds a query to retrieve a list of resources and returns a ResourcesQueryBuilder
object.
The returned object contains the query definition, which is typically used to run the query using the find() function.
You can refine the query by chaining ResourcesQueryBuilder
functions onto the query. ResourcesQueryBuilder
functions enable you to sort, filter, and control the results that queryResources()
returns.
queryResources()
runs with the following ResourcesQueryBuilder
default that you can override:
limit
is 50
.id
in ascending order.The functions that are chained to queryResources()
are applied in the order they are called. For example, if you apply ascending("typeId")
and then ascending("id")
, the results are sorted first by the "typeId"
, and then, if there are multiple results with the same "typeId"
, the items are sorted by "id"
.
The following ResourcesQueryBuilder
functions are supported for the queryResources()
function. For a full description of the resource object, see the object returned for the items property in ResourcesQueryResult
.