Skip to main content

Run a virtual view (saved query).

POST/api/v1/virtual-views/{virtual_view_id}/executeanalytics:read

The result is an execution table: the view's columns, filtered, aggregated and paged.

Scopeanalytics:read
AsynchronousNo
MCP toolexecute_virtual_view
Portal permissionsexecute_virtual_views, view_virtual_view_results
Pagingsnapshot
Default orderplan order + unique key where the plan has one

Parameters​

NameInTypeRequiredDescription
virtual_view_idpathstringRequired
limitqueryintegerOptionalDefault: 50; ≥ 1
cursorquerystringOptional
Docwize-Versionheaderstring (date)Optional

Request body​

Content typeType
application/jsonVirtualViewExecuteInput

Responses​

StatusDescriptionBody
200Success.application/json object
400invalid_version, malformed_jsonapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
404not_foundapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
409conflictapplication/problem+json Problem
410cursor_expiredapplication/problem+json Problem
413payload_too_largeapplication/problem+json Problem
415unsupported_media_typeapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422invalid_cursor, validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

200 body​

FieldTypeRequiredDescription
columnsarray of objectRequired
next_cursorstring or nullRequired
rowsarray of array of anyRequired
warningsarray of objectRequired

Errors​

The problem codes this operation can answer with. Each code links to its page.

Schemas​

VirtualViewExecuteInput​

FieldTypeRequiredDescription
aggregateanyOptionalGroup and total the view's rows, as the query builder writes it.
contextanyOptionalValues for the inputs the view asks for, keyed by input name, as a JSON object.
document_idstring or nullOptionalThe document the view runs for, when the view reads the document's own rows.
post_aggregationsanyOptionalGroup and total the result, as the query builder writes it.
post_filtersanyOptionalA filter on the result columns, as the query builder writes it.