Run chart queries
const url = 'https://example.com/v1/yac/query';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"package":"example","selections":{},"queries":[{"vizId":"example","source":{},"transformation":[{}],"displayDataOnly":true,"offset":1}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/yac/query \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "package": "example", "selections": {}, "queries": [ { "vizId": "example", "source": {}, "transformation": [ {} ], "displayDataOnly": true, "offset": 1 } ] }'Run every visible chart’s transformation pipeline as SQL, in one batch.
The server-side counterpart of the toolkit’s in-browser executor: each query is compiled to SQL against the package’s backend, with the current selections applied.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Stateless batched query: every visible viz spec + the current selection state, in one request. Mirrors the toolkit’s createRemoteBackend wire contract (packages/grammar/queryBackend.ts).
object
object
object
object
object
object
object
Responses
Section titled “Responses”Successful Response
object
One result per query, keyed by vizId. A query that fails carries {error} instead of rows; the others still succeed.
object
object
Example generated
{ "results": { "additionalProperty": {} }}Missing, invalid or expired token (detail).
An error body. Authentication failures carry FastAPI’s detail
instead of error.
object
object
Example generated
{ "error": "example", "code": "example", "errors": [ "example" ], "detail": [ {} ]}database_forbidden: the database rejected the caller’s forwarded identity (JWT passthrough).
An error body. Authentication failures carry FastAPI’s detail
instead of error.
object
object
Example generated
{ "error": "example", "code": "example", "errors": [ "example" ], "detail": [ {} ]}no_backend: no query backend is configured for the package.
An error body. Authentication failures carry FastAPI’s detail
instead of error.
object
object
Example generated
{ "error": "example", "code": "example", "errors": [ "example" ], "detail": [ {} ]}Validation Error
object
object
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}The identity provider’s keys could not be fetched (JWT_JWKS_URL).
An error body. Authentication failures carry FastAPI’s detail
instead of error.
object
object
Example generated
{ "error": "example", "code": "example", "errors": [ "example" ], "detail": [ {} ]}