queryResources( )


Developer Preview

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.
  • Sorted by 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.

PROPERTYSUPPORTED FILTERS & SORTING
singleResource.locationOptions.availableInAllLocationseq(),ne(),exists(),in(),hasSome(),ascending(),descending()
singleResource.locationOptions.specificLocationOptions.availableInBusinessLocationseq(),ne(),exists(),in(),hasSome(),ascending(),descending()
singleResource.locationOptions.specificLocationOptions.businessLocations.locationIdeq(),ne(),exists(),in(),hasSome(),startsWith(),ascending(),descending()
_ideq(),ne(),exists(),in(),hasSome(),startsWith(),ascending(),descending()
_createdDateeq(),ne(),exists(),in(),hasSome(),lt(),le(),gt(),ge(),ascending(),descending()
_updatedDateeq(),ne(),exists(),in(),hasSome(),lt(),le(),gt(),ge(),ascending(),descending()
nameeq(),ne(),exists(),in(),hasSome(),startsWith()
typeIdeq(),ne(),exists(),in(),hasSome(),startsWith(),ascending(),descending()
locationOptions.availableInAllLocationseq(),ne(),exists(),in(),hasSome(),ascending(),descending()
eventsSchedule.scheduleIdeq(),ne(),exists(),in(),hasSome(),startsWith(),ascending(),descending()
Permissions
Manage Bookings - all permissions
Read Bookings - all read permissions
Manage Bookings
Read Bookings - Public Data
Read Bookings - Including Participants
Learn more about app permissions.
Method Declaration
Copy
Request
This method does not take any parameters
Returns
Did this help?