queryEvents( )


Creates a query to retrieve a list of events.

The queryEvents() function builds a query to retrieve a list of events and returns an EventsQueryBuilder 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 EventsQueryBuilder functions onto the query. EventsQueryBuilder functions enable you to sort, filter, and control the results that queryEvents() returns.

queryEvents() runs with the following EventsQueryBuilder default that you can override:

  • limit is 50.
  • Sorted by event.start in ascending order.

The functions that are chained to queryEvents() are applied in the order they are called.

The following EventsQueryBuilder functions are supported for the queryEvents() function. For a full description of the events object, see the object returned for the items property in EventsQueryResult.

PROPERTYSUPPORTED FILTERS & SORTING
scheduleIdeq(),in()
externalScheduleIdeq(),in()
typeeq(),in()
recurringEventIdeq(),in()
transparencyeq()
locationexists()
location.ideq(),in()
location.typeeq(),in()
resources.idhasSome(),hasAll()
resources.typehasSome(),hasAll()
resources.transparencyhasSome(),hasAll()
totalCapacityeq(),ne(),gt(),ge(),lt(),le(),exists()
remainingCapacityeq(),ne(),gt(),ge(),lt(),le()
participants.totaleq(),ne(),gt(),ge(),lt(),le()
conferencingDetailsexists()
appIdeq(),in()
Authentication

This method may require higher-level permissions than the caller has, based on their identity and roles and permissions. In these cases, you can ensure the method is called with the required level of authorization by using one of the following:

Permissions
Read Calendar
Read Calendar - Including PI
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
optionsQueryEventsOptions
Returns
Return Type:EventsQueryBuilder
Errors

This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?