This method will be deprecated on June 30, 2025.
Replace with Query Events.
Depending on your use case, you may also replace the method by using External Calendar V2 List Events (SDK | REST).
Retrieves a list of sessions, given the provided time range, filtering, and paging.
To query for event instances within a specified time range of up to 1 year, provide a startDate
and endDate
.
Query Sessions runs with these defaults, which you can override:
EVENT
are returned. An event is a single or recurring session that appears in a calendar, for example an appointment or a class.instances
is true. This means only single session instances and instances of recurring sessions are returned.includeExternal
is false. This means that sessions imported from connected external calendars are not returned.NO_PI
fieldset. This means they don't contain personal information.query.cursorPaging.limit
is 100
.Note the following limitations, which you can't override:
start.timestamp
in ASC
order.To query only for working hours sessions, set type
to WORKING_HOURS
. A working hours session is a single or recurring session that defines availability in a schedule.
To query for all session types, including events and working hours sessions, set type
to ALL
.
To query for recurring session pattern definitions, set instances
to false
. In this case, fromDate
and toDate
may be more than 1 year apart.
To return session objects including personal information, use the ALL_PI
fieldset. This requires the Read Bookings Calendar - Including Participants or the Manage Bookings Services and Settings or the Manage Business Calendar permission scope.
For details on fieldsets, see Sessions: Supported Fieldsets.
For field support for filters, see Sessions: Supported Filters.
To learn about working with Query endpoints in general, see API Query Language and Field Projection.
You can only call this method when authenticated as a Wix app or Wix user identity.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.