Skip to main content
POST
Python SDK

Access

An MCP token or a Parable token can call this operation. See Authentication for the kinds of token. Your roles must grant one of tenant.parables.view, tenant.parables.manage.

Errors

  • PA-AU-040: The Plot data command or parameters are not conforming. Select one valid Plot and provide parameters that match its contract.
  • PA-AU-003: The Plot context or contract changed during the read. Refresh Plot context and retry with the latest revision.
  • PA-AU-001: The Parable, Plot, or Report data was not found. Check the rootRefId and selected Plot or Report.
  • PA-AU-019: The command sent sql of its own, and the caller could not save that SQL as this Plot. Saving it takes tenant.parables.manage, Publishing or Primary on the Parable, and edit.plots or create.plots from the Plot’s Pane Policies. Read the Plot without sql to get its saved rows. Running other SQL needs the right to save that Plot.
  • QL-TO-002: The Plot query ran past its time budget and was stopped (HTTP 504). The message names the budget. Narrow the Plot with a filter, a shorter date range or an aggregation, then read it again.
  • QL-IN-008: Too many queries were running, so the read did not start (HTTP 429). Read the Plot again after a short pause.
  • QL-SQ-010: The Plot read would send more paid AI calls (ponder, embed and the Jev functions) than one query may send, so it stopped before the next call (HTTP 400). The message names the limit and the function. Call the AI function over fewer rows, or read a stored Refresh of the Plot.
  • QL-SQ-011: The Plot read’s paid AI calls would cost more than one query may spend, so it stopped before the next call (HTTP 400). The message names the limit and what the read spent. Call the AI function over fewer rows or with a cheaper model, or read a stored Refresh of the Plot.
  • QL-TN-007: The read asked for a stored Refresh, and Provider Policies or source permissions narrow what the caller reads of a Provider table behind it. The Refresh holds rows the caller cannot read, so it is refused (HTTP 403). Do not read this Refresh again as this caller. Someone whom no Provider Policy or source permissions narrow on those tables can open it.

Authorizations

Authorization
string
header
required

A personal access token, which starts with pat_. A Parable token can call each operation that the roles of its owner allow. An MCP token can call only the read operations that are open to agents. A SQL token does not work on this API.

Headers

X-Tenant
string

Workspace slug. Overrides subdomain-based workspace resolution when provided.

Example:

"acme"

X-Request-ID
string<uuid>

Optional request correlation ID echoed back in the response.

Example:

"550e8400-e29b-41d4-a716-446655440000"

Path Parameters

rootRefId
string
required

rootRefId parameter UUID v4 with automatic base62 encoding for client-facing APIs

Query Parameters

refId
string

UUID v4 with automatic base62 encoding for client-facing APIs

versionId
string

UUID v4 with automatic base62 encoding for client-facing APIs

Body

application/json

A request for a page of a Plot's data. It names the Plot, never a schema, table or storage location: Parable resolves the target.

pageSize
integer<int64>
required

Page size, from 1 to 10,000 rows.

Required range: 1 <= x <= 10000
reading
object
required

Requested data reading, shared by React context and the Plot data protocol. REPORT_RUN requires reportRunId; CURRENT requires null. Boundary validation enforces this cross-field invariant in every executor.

columns
string[] | null

Optional projected columns; null means all schema columns.

cursor
string | null

Opaque pagination cursor minted by the server; null starts at the first page. Its encoding is private and can change. Send it back unchanged.

expectedContractHash
string | null

Contract captured by the renderer; stale declarations refuse before execution.

Required string length: 64
Pattern: ^[0-9a-f]{64}$
expectedPieceVersions
object[] | null

The read fence: the versions of the Pieces that this read reads, as the reader's view holds them (PlotDataMeta.pieceVersions of the read before, updated by Piece deltas). The read is refused with PA-AU-077 only when one of them changed, never because another Piece of the set of Changes changed. When present, it replaces the fence on expectedRefRevision.

Maximum array length: 256
expectedRefRevision
integer<int64> | null

Draft revision captured by the React host; prevents silent definition drift.

Required range: 1 <= x <= 9007199254740991
paneValues
object[] | null

The reader's on-screen values of the Panes the Plot reads by name. A Pane left out reads its saved value: Me, then This Parable, then the Plot's default. At most 1 MB in all.

parameters
any[] | null

Omitted uses saved bindings; a supplied array replaces all bindings.

Any valid JSON value: object, array, primitive, or null

plot
string | null

Plot slug within the Parable (immutable SQL segment).

Required string length: 1 - 255
Pattern: ^[a-z0-9]+(?:[-_][a-z0-9]+)*$
plotKey
string | null

Stable declared Plot identity; alternative to the catalog slug.

Pattern: ^([0-9A-Za-z]{1,22}|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
requireMaterialized
boolean | null

Read a compatible completed artifact only; never execute ordinary SQL.

sort
object[] | null

Ordered sort terms; null means server default order.

sql
string | null

Constructed SQL for the selected declared contract, run in place of the saved source. Accepted only from someone who could save it as this Plot: tenant.parables.manage, Publishing or Primary on the Parable, and edit.plots or create.plots from the Plot's Pane Policies.

Minimum string length: 1
Pattern: ^[\s\S]*$

Response

Successful response

data
object
required

Workspace-facing Plot data page. No storage-engine fields on this shape.

meta
object
required