Docs

Execute Query

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

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

Required Tokens

FieldTypeRequiredDescription
BearerAuthorization: Bearer <api-key>OptionalYour API key. Pass it as the Bearer token on every request.
Event tokenx-Event-TokenOptionalRun **Get Tokens** in the Authorization folder.

Executes the QueryBlock identified by blockId within a document. Reads the block's query attribute from the stored TipTap content, validates it against the entity registry, translates it to EF Core via Dynamic LINQ, and returns the resulting rows.

Variable references ($var:<id>) in filters are resolved using the variables map in the request body. Unresolved variable filters are silently dropped.

Requires EventDocumentsEdit permission.

Path Parameters

FieldTypeRequiredDescription
documentIdGuidOptionalThe document containing the QueryBlock.
blockIdstringOptionalThe TipTap UniqueID of the `queryBlock` node (UUID string from the editor).

Request Body

FieldTypeRequiredDescription
variablesobjectOptionalMap of variable IDs to resolved values. Pass `{}` if no variable filters exist.

Response

Returns an ExecuteQueryResponse with a rows array. Each row is a flat Dictionary<string, object> keyed by the column alias from the query's select definition.

{
  "rows": [
    { "Name": "Sound Check", "StatusName": "In Progress", "PhaseName": "Load In" },
    { "Name": "Media Call", "StatusName": "Complete",    "PhaseName": "Show Day" }
  ]
}