POST/documents/{documentId}/query/{blockId}
Runs the QueryBlock identified by blockId in a document. The blockId is the TipTap unique id of the queryBlock node in
the document content from DynamicDocs_GetDocument. A data table (queryVersion 2) runs as saved, under its stamp, and
returns the whole result (StoredQueryRunResult); each document filter takes the request's value, else its defaults, a
required one with no value is a 400 and an optional one drops its rules. brokenDetail only at Edit and above. A v1
block not yet converted by the release returns an empty result. Needs View on the doc's file. This is a read
despite being a POST.
Send versionId (from Drives_GetFileVersions) to run the block and filters of that saved version instead; 404 when
the version is not this doc's.
from runs the block for a caller who opened the doc from a record (see DynamicDocs_GetDocument); not with versionId.
An organization-drive doc's tables read the organization.
Path Parameters
| Field | Type | Required | Description |
|---|
| documentId | uuid | Required | |
| blockId | string | Required | |
Request Body
| Field | Type | Required | Description |
|---|
| filters | object | Optional | |
| versionId | uuid | Optional | |
| from | string | Optional | |
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 | |
QueryGroupKeyPart
| Field | Type | Description |
|---|
| path | string| null | |
| value | JsonElement| null | |
StoredQueryColumnOption
| Field | Type | Description |
|---|
| id | string| null | |
| label | string| null | |
| color | string| null | |
| icon | string| null | |