Documents

Read an in-house Space document as blocks with ids, hashes and its revision: an outline, one table or list, a search, the changes since a revision, or a past revision

GET
/v1/space/documents/{document_id}/view
curl -X GET "https://api.orchestor.io/v1/space/documents/%3Cdocument_id%3E/view" \  -H "Authorization: Bearer $API_KEY" \  -H "X-Workspace-ID: wks_abc123"
{  "data": {    "latest": 0,    "rev": 0,    "xml": "<string>"  }}

Get your Orchestor API key

Create an API key in your workspace settings.

Authorizations

Satisfy one of these options:

  • Session cookie
  • API key

Authentication details

cookie
wos-session

Browser session established by signing in to the web app. The server checks your workspace membership and permissions. Supply X-Workspace-ID for workspace-scoped operations. For server-to-server requests, use an API key when the operation supports it.

Path Parameters

document_idstringpathrequired
Pattern
^doc_[a-f0-9]{24}$

Query Parameters

projectionstringenum<string>query

outline: top-level blocks only, lists and tables folded to <gap/>.

Allowed
outline
parent_idstringquery

One block (a table or list) in full, with its rows, cells or items.

Pattern
^\d+\.\d+$

Only the text blocks that hold these words, with character ranges.

String length
≥ 1, ≤ 1000
since_revinteger | nullquery

Only the blocks changed since this revision; unchanged runs as <gap/>, deleted blocks as <gone/>.

Value range
≥ 0
at_revintegerquery

The document as it stood at this revision.

Value range
≥ 1

Headers

X-Workspace-IDstringheader

Workspace to access. With a workspace-scoped API key, the server derives this value from the key, so the header is optional. If supplied, it must match the credential workspace or the request returns 403 workspace_mismatch. For interactive session requests, supply this header to select a workspace where you are a member. A project ID cannot be used as a workspace ID.

Example"wks_abc123"

Response

application/json

Block XML (<doc rev=…>) and the revision it reflects

dataSpaceDocumentViewrequired
data.latestinteger
data.revintegerrequired
data.xmlstringrequired