import json
import os
from parable_types_web_api import PlotDataCommand
from parable_web_api_sdk import ClientConfig, WebApiSDK
sdk = WebApiSDK(
ClientConfig(
base_url=os.environ["PARABLE_API_URL"],
auth_token=os.environ["PARABLE_API_TOKEN"],
default_headers={"X-Tenant": os.environ["PARABLE_WORKSPACE"]},
)
)
input_data = PlotDataCommand.model_validate(
json.loads("{\"reading\":{\"kind\":\"CURRENT\"},\"pageSize\":1}"),
)
result = sdk.parable_authoring.read_parable_plot_data('example', input_data, ref_id=None, version_id=None)sdk, err := webapisdk.New(webapisdk.SDKConfig{
BaseURL: os.Getenv("PARABLE_API_URL"),
Auth: &webapisdk.AuthConfig{Token: os.Getenv("PARABLE_API_TOKEN")},
RequestInterceptor: func(ctx context.Context, req *http.Request) error {
req.Header.Set("X-Tenant", os.Getenv("PARABLE_WORKSPACE"))
return nil
},
})
if err != nil {
return err
}
var input webapitypes.PlotDataCommand
if err := json.Unmarshal([]byte(`{"reading":{"kind":"CURRENT"},"pageSize":1}`), &input); err != nil {
return err
}
query := &namespaces.ParableAuthoringReadParablePlotDataQueryParams{}
result, err := sdk.ParableAuthoringNamespace.ReadParablePlotData(ctx, "example", input, query){
"data": {
"columns": [
{
"name": "<string>",
"primitive": "<string>",
"scalarRef": "<string>"
}
],
"meta": {
"freshness": "2023-11-07T05:31:56Z",
"materialized": true,
"reading": {
"kind": "CURRENT",
"reportRunId": "<string>"
},
"sampled": true,
"boundPaneKeys": [
"<string>"
],
"consumerContractHash": "<string>",
"context": {
"data": {
"kind": "CURRENT",
"reportRunId": "<string>"
},
"mode": "personal",
"parable": {
"handle": "<string>",
"parableId": "<string>",
"revision": {
"kind": "ref",
"commitId": "<string>",
"refId": "<string>",
"refRevision": 0
}
},
"permissions": [
"<string>"
],
"principal": {
"actorId": "<string>",
"actorKind": "organization",
"email": "jsmith@example.com"
},
"raci": "responsible",
"workspace": {
"workspaceId": "<string>"
},
"actor": {
"actorId": "<string>",
"actorKind": "organization",
"email": "jsmith@example.com"
},
"viewAs": {
"actorId": "<string>",
"actorKind": "organization",
"email": "jsmith@example.com"
}
},
"contractHash": "<string>",
"currentDirectoryData": true,
"inputHydration": "<unknown>",
"occurredAt": "2023-11-07T05:31:56Z",
"outputHydration": "<unknown>",
"parableReads": [
{
"empty": true,
"parableId": "<string>",
"releaseId": "<string>",
"reportRunId": "<string>"
}
],
"pieceVersions": [
{
"pieceKey": "<string>",
"version": 0
}
],
"plotEntityVersion": 0,
"plotKey": "<string>",
"publishedCommitId": "<string>",
"sample": {
"candidateCount": 0,
"measuredCost": 4503599627370495,
"size": 0,
"projectedFullRunCost": 4503599627370495
},
"settingsChanged": true,
"sourceHash": "<string>",
"sourceImplementationId": "<string>",
"sourceImplementationVersion": 0,
"tableCardinality": 0,
"upstreamPlotKeys": [
"<string>"
],
"watermark": "2023-11-07T05:31:56Z"
},
"rows": [
{
"cells": [
"<unknown>"
]
}
],
"findings": [
{
"code": "conflict",
"message": "<string>"
}
],
"nextCursor": "<string>"
},
"meta": {
"requestId": "<string>",
"totalCount": 123
},
"links": {
"first": "<string>",
"last": "<string>",
"next": "<string>",
"prev": "<string>"
}
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}Read a Plot's data
Returns a page of rows from a saved Plot, under the Policies in force. The server works out where the data comes from and returns it alongside the definition it was read with.
import json
import os
from parable_types_web_api import PlotDataCommand
from parable_web_api_sdk import ClientConfig, WebApiSDK
sdk = WebApiSDK(
ClientConfig(
base_url=os.environ["PARABLE_API_URL"],
auth_token=os.environ["PARABLE_API_TOKEN"],
default_headers={"X-Tenant": os.environ["PARABLE_WORKSPACE"]},
)
)
input_data = PlotDataCommand.model_validate(
json.loads("{\"reading\":{\"kind\":\"CURRENT\"},\"pageSize\":1}"),
)
result = sdk.parable_authoring.read_parable_plot_data('example', input_data, ref_id=None, version_id=None)sdk, err := webapisdk.New(webapisdk.SDKConfig{
BaseURL: os.Getenv("PARABLE_API_URL"),
Auth: &webapisdk.AuthConfig{Token: os.Getenv("PARABLE_API_TOKEN")},
RequestInterceptor: func(ctx context.Context, req *http.Request) error {
req.Header.Set("X-Tenant", os.Getenv("PARABLE_WORKSPACE"))
return nil
},
})
if err != nil {
return err
}
var input webapitypes.PlotDataCommand
if err := json.Unmarshal([]byte(`{"reading":{"kind":"CURRENT"},"pageSize":1}`), &input); err != nil {
return err
}
query := &namespaces.ParableAuthoringReadParablePlotDataQueryParams{}
result, err := sdk.ParableAuthoringNamespace.ReadParablePlotData(ctx, "example", input, query){
"data": {
"columns": [
{
"name": "<string>",
"primitive": "<string>",
"scalarRef": "<string>"
}
],
"meta": {
"freshness": "2023-11-07T05:31:56Z",
"materialized": true,
"reading": {
"kind": "CURRENT",
"reportRunId": "<string>"
},
"sampled": true,
"boundPaneKeys": [
"<string>"
],
"consumerContractHash": "<string>",
"context": {
"data": {
"kind": "CURRENT",
"reportRunId": "<string>"
},
"mode": "personal",
"parable": {
"handle": "<string>",
"parableId": "<string>",
"revision": {
"kind": "ref",
"commitId": "<string>",
"refId": "<string>",
"refRevision": 0
}
},
"permissions": [
"<string>"
],
"principal": {
"actorId": "<string>",
"actorKind": "organization",
"email": "jsmith@example.com"
},
"raci": "responsible",
"workspace": {
"workspaceId": "<string>"
},
"actor": {
"actorId": "<string>",
"actorKind": "organization",
"email": "jsmith@example.com"
},
"viewAs": {
"actorId": "<string>",
"actorKind": "organization",
"email": "jsmith@example.com"
}
},
"contractHash": "<string>",
"currentDirectoryData": true,
"inputHydration": "<unknown>",
"occurredAt": "2023-11-07T05:31:56Z",
"outputHydration": "<unknown>",
"parableReads": [
{
"empty": true,
"parableId": "<string>",
"releaseId": "<string>",
"reportRunId": "<string>"
}
],
"pieceVersions": [
{
"pieceKey": "<string>",
"version": 0
}
],
"plotEntityVersion": 0,
"plotKey": "<string>",
"publishedCommitId": "<string>",
"sample": {
"candidateCount": 0,
"measuredCost": 4503599627370495,
"size": 0,
"projectedFullRunCost": 4503599627370495
},
"settingsChanged": true,
"sourceHash": "<string>",
"sourceImplementationId": "<string>",
"sourceImplementationVersion": 0,
"tableCardinality": 0,
"upstreamPlotKeys": [
"<string>"
],
"watermark": "2023-11-07T05:31:56Z"
},
"rows": [
{
"cells": [
"<unknown>"
]
}
],
"findings": [
{
"code": "conflict",
"message": "<string>"
}
],
"nextCursor": "<string>"
},
"meta": {
"requestId": "<string>",
"totalCount": 123
},
"links": {
"first": "<string>",
"last": "<string>",
"next": "<string>",
"prev": "<string>"
}
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}Access
An MCP token or a Parable token can call this operation. See Authentication for the kinds of token. Your roles must grant one oftenant.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
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
Workspace slug. Overrides subdomain-based workspace resolution when provided.
"acme"
Optional request correlation ID echoed back in the response.
"550e8400-e29b-41d4-a716-446655440000"
Path Parameters
rootRefId parameter UUID v4 with automatic base62 encoding for client-facing APIs
Query Parameters
UUID v4 with automatic base62 encoding for client-facing APIs
UUID v4 with automatic base62 encoding for client-facing APIs
Body
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.
Page size, from 1 to 10,000 rows.
1 <= x <= 10000Requested 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.
Show child attributes
Show child attributes
Optional projected columns; null means all schema columns.
Opaque pagination cursor minted by the server; null starts at the first page. Its encoding is private and can change. Send it back unchanged.
Contract captured by the renderer; stale declarations refuse before execution.
64^[0-9a-f]{64}$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.
256Show child attributes
Show child attributes
Draft revision captured by the React host; prevents silent definition drift.
1 <= x <= 9007199254740991The 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.
Show child attributes
Show child attributes
Omitted uses saved bindings; a supplied array replaces all bindings.
Any valid JSON value: object, array, primitive, or null
Plot slug within the Parable (immutable SQL segment).
1 - 255^[a-z0-9]+(?:[-_][a-z0-9]+)*$Stable declared Plot identity; alternative to the catalog slug.
^([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})$Read a compatible completed artifact only; never execute ordinary SQL.
Ordered sort terms; null means server default order.
Show child attributes
Show child attributes
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.
1^[\s\S]*$