Docs

Execute Query

POST /documents/{documentId}/query/{blockId}

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

FieldTypeRequiredDescription
documentIduuidRequired
blockIdstringRequired

Request Body

FieldTypeRequiredDescription
filtersobjectOptional
versionIduuidOptional
fromstringOptional

Response

FieldTypeDescription
rowsobject[]| null
groupsStoredQueryGroup[]| null
columnsStoredQueryColumn[]| null
truncatedboolean
brokenboolean
brokenReasonstring| null
brokenDetailBrokenDetail

StoredQueryGroup

FieldTypeDescription
keyQueryGroupKeyPart[]| null
labelsstring[]| null
countinteger

StoredQueryColumn

FieldTypeDescription
aliasstring| null
labelstring| null
kindstring| null
optionsStoredQueryColumnOption[]| null

BrokenDetail

FieldTypeDescription
pathstring| null
usagestring| null
labelstring| null
v1Textstring| null

QueryGroupKeyPart

FieldTypeDescription
pathstring| null
valueJsonElement| null

StoredQueryColumnOption

FieldTypeDescription
idstring| null
labelstring| null
colorstring| null
iconstring| null