Docs

Validate Organization Stored Query

POST /organizations/{orgId}/queries/validate

POST/organizations/{orgId}/queries/validate

Validates a data table's query in an organization-drive Dynamic Docs doc, as Query_ValidateStoredQuery does for an event doc: returns the stamp saving it would write, with its label and term labels, and a column you can't use (or a source with no organization scope, such as Area) is a 400 naming it. Needs Edit on the doc, which must be on this organization's drive. orgId from Users_GetOrganizations, documentId from Drives_GetFiles, blockId from the doc's content.

Path Parameters

FieldTypeRequiredDescription
orgIduuidRequired

Request Body

FieldTypeRequiredDescription
documentIduuidOptional
blockIdstringOptional
sourcestringOptional
queryQueryRequestOptional

QueryRequest

FieldTypeDescription
sourcestring| null
selectQuerySelect[]| null
filterQueryFilterGroup| null
searchQuerySearch| null
sortsQuerySort[]| null
groupBysQueryGroupBy[]| null
groupKeyQueryGroupKeyPart[]| null
aggregatesQueryAggregate[]| null
chartsQueryChart[]| null
flagsQueryFlag[]| null
hierarchyQueryHierarchy| null
pageQueryPage| null
windowQueryWindow| null
viewportQueryViewport| null
includeTotalsboolean
includeAccessboolean
timeZonestring| null
todaystring| null
storedPreviewboolean
filtersobject| null

QuerySelect

FieldTypeDescription
pathstring| null
aliasstring| null
labelstring| null
isLayoutFieldboolean
collectionModestring| null

QueryFilterGroup

FieldTypeDescription
logicstring| null
rulesQueryFilterRule[]| null
groupsQueryFilterGroup[]| null

QuerySearch

FieldTypeDescription
textstring| null
pathsstring[]| null

QuerySort

FieldTypeDescription
pathstring| null
directionstring| null

QueryGroupBy

FieldTypeDescription
pathstring| null
dateBucketstring| null

QueryGroupKeyPart

FieldTypeDescription
pathstring| null
valueJsonElement| null

QueryAggregate

FieldTypeDescription
aliasstring| null
functionstring| null
pathstring| null

QueryChart

FieldTypeDescription
aliasstring| null
pathstring| null
dateBucketstring| null
stackPathstring| null
aggregateQueryAggregate| null
ignoreRuleIdsstring[]| null

QueryFlag

FieldTypeDescription
aliasstring| null
conditionQueryFilterGroup

QueryHierarchy

FieldTypeDescription
includeAncestorsboolean
includeDescendantsboolean
settingRuleIdsstring[]| null
parentIduuid| null

QueryPage

FieldTypeDescription
sizeinteger
cursorstring| null

QueryWindow

FieldTypeDescription
fromdate-time
todate-time
startPathstring| null
endPathstring| null
pointPathsstring[]| null

QueryViewport

FieldTypeDescription
westnumber
southnumber
eastnumber
northnumber
pathstring| null

QueryFilterRule

FieldTypeDescription
idstring| null
pathstring| null
operatorstring| null
valueJsonElement| null

Response

FieldTypeDescription
queryQueryRequest
stampobject| null
stampLabelstring| null
termsValidateStoredQueryResponseTermInfo[]| null

ValidateStoredQueryResponseTermInfo

FieldTypeDescription
labelstring| null