---
title: "Get document state"
method: GET
path: "/v2/documents/{documentId}"
tags: ["Documents v2"]
---

# Get document state

`GET /v2/documents/{documentId}`

Retrieve the document's published state. To read a draft's state, use [Get draft state](/api/documents-v2/get-draft-state) instead.

The response can be used as-is as the request body in a call to the [Patch draft API](/api/documents-v2/patch-draft).

Tiles in `queryPresentations.data` are keyed by a stable record key (e.g. `"1"`, `"2"`); the server uses that key to identify existing tiles on a later patch, so you never need to track any other identifier. Control IDs and container `instanceKey` / `referenceKey` values also round-trip unchanged.

A workbook-only document (no dashboard layout yet) returns only the workbook-scoped fields (`name`, `description`, `queryPresentations`); the dashboard-scoped `containers`, `controls`, and `settings` are omitted until a layout exists.

## Path parameters

- `documentId` string, required

## Query parameters

- `pretty` boolean

## Response `200`

Document state.

- DocumentsV2ReadResponse — Current document (or draft) state. Round-trippable: submit this verbatim as a draft `PATCH` body. `containers`, `controls`, and `settings` are dashboard-scoped and omitted for workbook-only documents with no layout yet.
  - `name` string, required — Document name.
  - `description` string, nullable, required — Document description.
  - `modelId` string, uuid — The `SHARED` or `SHARED_EXTENSION` model the workbook is built on.
  - `workbookModelId` string, uuid — The workbook-layer model ID. Each document has its own workbook model for document-specific fields and calculations. For drafts, this returns the draft's workbook model ID, not the published document's.
  - `queryPresentations` DocumentsV2QueryPresentationsRead, required
    - `data` object, required — Tabs keyed by record key (a positive-integer string).
    - `order` string[], required — Tab display order.
  - `controls` DocumentsV2ControlsRead
    - `data` object, required — Controls keyed by control ID.
    - `order` string[], required — Display order for controls.
  - `settings` DocumentsV2SettingsRead
    - `crossfilterEnabled` boolean, required — When true, clicking a value in one tile filters all other tiles on the dashboard.
    - `customText` object, nullable, required — Custom text replacing default UI strings on the dashboard.
      - `queryError` string
      - `queryNoResults` string
    - `facetFilters` boolean, required — When true, dashboard filters are applied per-facet when faceting is active.
    - `refreshInterval` number, nullable, required — Auto-refresh interval in seconds. Null disables auto-refresh.
    - `runQueriesOn` 'current-page' | 'all-pages' | 'null', nullable, required — Controls whether dashboard queries execute on the visible page or across all pages.
  - `containers` object[] — Container layout array (grid / stack / page / reference containers, recursively nested). On a patch, when present this **fully replaces** the existing layout. The server validates the full structure on apply; container `instanceKey` / `referenceKey` values round-trip unchanged. See the dashboard layout reference for the complete grammar.

## Other responses

- `401` — Authentication required.
- `403` — Insufficient permissions to read the document.
- `404` — Document not found.
- `422` — The document cannot be read as a dashboard: a classic-layout dashboard (upgrade to the advanced layout first) or an app document.

---

[API](https://skmtc.net/omni/apis/omni-api.md) · [All operations](https://skmtc.net/omni/apis/omni-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/omni/omni-api/versions/6b02f7349d0e/schema)
