Event queries
- Last UpdatedJul 01, 2026
- 2 minute read
Events can be queried using various filters (see Supported event filters). All queries include the following parameters:
|
Parameter |
Data Type |
Description |
|---|---|---|
|
startsAfter |
DateTime |
Sets the lower end of the query window, querying for events whose start time is later than the specified time. The default is set to the day before startsBefore. |
|
startsBefore |
DateTime |
Sets the higher end of the query window, querying for events whose start time is earlier than the specified time. The default is either set to the current time or the day after startsAfter, if provided. |
|
pageSize |
Int32 |
The maximum number of events to return per page of query results. The default is 100 events, and the maximum is 500. |
|
orderBy |
String |
Sorts the query results by a property name and direction. For more information, see OrderBy below. |
|
continuationToken |
String |
Token to retrieve the next page of query results while maintaining the original query parameters. Tokens can be found at the end of a page of query results. If there is no token, that marks the last page of query results. |
OrderBy
The OrderBy parameter supports sorting event query results by one of the queried properties in either ascending or descending order. The format is [Property] [asc|desc]. The OrderBy property must be one of the properties included in the filters or StartTime. Note that including the OrderBy parameter may affect the performance of the query.
Examples
|
Provided Query |
Result |
|---|---|
|
Query=Count gt 50 |
Events are ordered by count, ascending (default) |
|
Query=Count gt 50&OrderBy=Count desc |
Events are ordered by count, descending |
|
Query=Count gt 50&OrderBy=StartTime |
Events are ordered by StartedAt, ascending |
|
Query=Count gt 50 AND Weight eq 50 |
Events are ordered by count or weight, depending on which index is chosen by the data store, ascending (default) |
Summarize Query
The SummarizeQuery RPC lets you compute numeric summaries โ count, min, max, average, and sum โ across a filtered set of resources, entities, or events. See Summarize Query.