Render Chart

View as Markdown
Render a chart PNG from a Vega-Lite v5 spec with the data inline, and store it as an artifact in this vault. Returns a url to embed and an artifactId that send_email can attach. Do not set colors: the vault's theme is applied automatically. Match the mark to the question. anything over time is a line, a ranking is a sorted horizontal bar, part-of-whole is an arc. Requires a manager API key, since it stores a file.

Authentication

AuthorizationBearer
Create a personal key in Alpha settings, or use an access token issued to an approved OAuth client.

Request

This endpoint expects an object.
titlestringRequired
Chart title, shown on the image
vega_lite_specobjectRequired

Complete Vega-Lite v5 spec with inline data, e.g. {“data”:{“values”:[{“month”:“2026-05”,“team”:“Logistics”,“mentions”:11}]},“mark”:“line”,“encoding”:{…}}. For month buckets set “timeUnit”:“yearmonth” or the axis is labelled by day.

vaultstringOptional

Exact vault id or name from list_vaults. Required whenever the key can reach more than one vault; never guess or use one client’s vault for another.

Response headers

X-Request-IdstringOptional
Stable identifier for tracing this request in Alpha logs.

Response

Render Chart completed.
datamap from strings to any or list of maps from strings to any
The result returned by the selected Alpha tool.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error