POST/events/{eventId}/queries
Runs a read-only query on an event source (Crew, Collaborator or Area), as Query_RunOrganizationQuery does for the
organization, including group headers, aggregates, charts, flags, windows and viewports. Source names come from
Query_GetEventQuerySources. The eventId must be the event token's. Needs Event basic access. With storedPreview
true (a Dynamic Docs table preview) it returns the stored-run shape instead, the whole result in group order.
today (yyyy-MM-dd, the caller's local date) anchors relative dates such as Today; without it they resolve from the UTC date.
Path Parameters
| Field | Type | Required | Description |
|---|
| eventId | uuid | Required | |
Request Body
| Field | Type | Required | Description |
|---|
| source | string | Optional | |
| select | QuerySelect[] | Optional | |
| filter | QueryFilterGroup | Optional | |
| search | QuerySearch | Optional | |
| sorts | QuerySort[] | Optional | |
| groupBys | QueryGroupBy[] | Optional | |
| groupKey | QueryGroupKeyPart[] | Optional | |
| aggregates | QueryAggregate[] | Optional | |
| charts | QueryChart[] | Optional | |
| flags | QueryFlag[] | Optional | |
| hierarchy | QueryHierarchy | Optional | |
| page | QueryPage | Optional | |
| window | QueryWindow | Optional | |
| viewport | QueryViewport | Optional | |
| includeTotals | boolean | Optional | |
| includeAccess | boolean | Optional | |
| timeZone | string | Optional | |
| today | string | Optional | |
| storedPreview | boolean | Optional | |
| filters | object | Optional | |
QuerySelect
| Field | Type | Description |
|---|
| path | string| null | |
| alias | string| null | |
| label | string| null | |
| isLayoutField | boolean | |
| collectionMode | string| null | |
QueryFilterGroup
| Field | Type | Description |
|---|
| logic | string| null | |
| rules | QueryFilterRule[]| null | |
| groups | QueryFilterGroup[]| null | |
QuerySearch
| Field | Type | Description |
|---|
| text | string| null | |
| paths | string[]| null | |
QuerySort
| Field | Type | Description |
|---|
| path | string| null | |
| direction | string| null | |
QueryGroupBy
| Field | Type | Description |
|---|
| path | string| null | |
| dateBucket | string| null | |
QueryGroupKeyPart
| Field | Type | Description |
|---|
| path | string| null | |
| value | JsonElement| null | |
QueryAggregate
| Field | Type | Description |
|---|
| alias | string| null | |
| function | string| null | |
| path | string| null | |
QueryChart
| Field | Type | Description |
|---|
| alias | string| null | |
| path | string| null | |
| dateBucket | string| null | |
| stackPath | string| null | |
| aggregate | QueryAggregate| null | |
| ignoreRuleIds | string[]| null | |
QueryFlag
| Field | Type | Description |
|---|
| alias | string| null | |
| condition | QueryFilterGroup | |
QueryHierarchy
| Field | Type | Description |
|---|
| includeAncestors | boolean | |
| includeDescendants | boolean | |
| settingRuleIds | string[]| null | |
| parentId | uuid| null | |
QueryPage
| Field | Type | Description |
|---|
| size | integer | |
| cursor | string| null | |
QueryWindow
| Field | Type | Description |
|---|
| from | date-time | |
| to | date-time | |
| startPath | string| null | |
| endPath | string| null | |
| pointPaths | string[]| null | |
QueryViewport
| Field | Type | Description |
|---|
| west | number | |
| south | number | |
| east | number | |
| north | number | |
| path | string| null | |
QueryFilterRule
| Field | Type | Description |
|---|
| id | string| null | |
| path | string| null | |
| operator | string| null | |
| value | JsonElement| null | |
Response
| Field | Type | Description |
|---|
| rows | object[]| null | |
| groups | StoredQueryGroup[]| null | |
| columns | StoredQueryColumn[]| null | |
| truncated | boolean | |
| broken | boolean | |
| brokenReason | string| null | |
| brokenDetail | BrokenDetail | |
StoredQueryGroup
| Field | Type | Description |
|---|
| key | QueryGroupKeyPart[]| null | |
| labels | string[]| null | |
| count | integer | |
StoredQueryColumn
| Field | Type | Description |
|---|
| alias | string| null | |
| label | string| null | |
| kind | string| null | |
| options | StoredQueryColumnOption[]| null | |
BrokenDetail
| Field | Type | Description |
|---|
| path | string| null | |
| usage | string| null | |
| label | string| null | |
| v1Text | string| null | |
StoredQueryColumnOption
| Field | Type | Description |
|---|
| id | string| null | |
| label | string| null | |
| color | string| null | |
| icon | string| null | |