Convert supported input into a Vizb Dataset or self-contained HTML.
const url = 'http://127.0.0.1:8080/';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"input":"region,latency\nwest,12\neast,18\n","id":"api-latency","name":"API latency","description":"Latency by region","tag":"v2","theme":"westeros","parser":"csv","select":["region,latency"],"charts":{"types":["bar","line"],"configs":[{"type":"bar","showLabels":true}]},"output":{"format":"dataset"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://127.0.0.1:8080/ \ --header 'Content-Type: application/json' \ --data '{ "input": "region,latency\nwest,12\neast,18\n", "id": "api-latency", "name": "API latency", "description": "Latency by region", "tag": "v2", "theme": "westeros", "parser": "csv", "select": [ "region,latency" ], "charts": { "types": [ "bar", "line" ], "configs": [ { "type": "bar", "showLabels": true } ] }, "output": { "format": "dataset" } }'Input is inline text or JSON. Parser, grouping, units, selection, and chart options are structured request data. Unknown or inapplicable options are rejected; CLI-style option strings are not accepted.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Dataset identifier used by UI deep links.
Dataset display name.
Chart title used only when grouping.colAxis produces one chart; independent of name.
Dataset description.
Dataset tag or run identifier.
Data-owned theme catalog embedded on the converted Dataset. When non-empty, themes[0] is the active theme. Prefer this over the legacy theme string. Built-in "default" is not embedded (UI owns it).
Fully expanded color theme. On Dataset and convert responses, themes[0] is the active theme when the catalog is non-empty.
object
Theme identifier used by the UI selector.
Categorical series palette.
Continuous gradient pair (exactly two colors).
Legacy single theme name, structured theme, or comma-separated hex palette. Expanded into themes when themes is omitted or empty. Prefer themes for new clients.
object
Place grouped numeric column names on this free axis so they share one chart.
object
Round numeric values to 2 decimal places in the output data
Structured column selections; each item is one select expression.
JSON-only path to a nested array.
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Examples
Convert inline CSV into a Dataset.
{ "input": "region,latency\nwest,12\neast,18\n", "id": "api-latency", "name": "API latency", "description": "Latency by region", "tag": "v2", "theme": "westeros", "parser": "csv", "select": [ "region,latency" ], "charts": { "types": [ "bar", "line" ], "configs": [ { "type": "bar", "showLabels": true } ] }, "output": { "format": "dataset" }}Convert wide competitor columns into one titled chart.
{ "input": "load,default,chi\n100,3103.62,3103.73\n1000,32423.67,32421.28\n", "name": "Q1 release", "title": "Framework throughput", "parser": "csv", "grouping": { "pattern": "y", "columns": [ "load" ], "colAxis": "x" }, "charts": { "types": [ "bar" ] }}Convert native JSON input into self-contained HTML.
{ "input": [ { "region": "west", "latency": 12 }, { "region": "east", "latency": 18 } ], "name": "API latency", "parser": "json", "grouping": { "pattern": "x", "columns": [ "region" ] }, "charts": { "types": [ "bar" ], "configs": [ { "type": "bar", "showLabels": true } ] }, "output": { "format": "html" }}Responses
Section titled “Responses”Conversion succeeded. The response media type is selected by output.format and must be acceptable to the client.
object
Data-owned theme catalog. When non-empty, themes[0] is the active theme. New writers emit themes only; legacy theme is migrated on load.
Fully expanded color theme. On Dataset and convert responses, themes[0] is the active theme when the catalog is non-empty.
object
Theme identifier used by the UI selector.
Categorical series palette.
Continuous gradient pair (exactly two colors).
Legacy single theme name or palette. Migrated into themes when themes is empty; omitted from new output after migration.
object
object
object
object
object
object
Each chart type may appear at most once.
object
object
Examples
{ "id": "api-latency", "name": "API latency", "description": "Latency by region", "tag": "v2", "themes": [ { "name": "westeros", "colors": [ "#516b91", "#59c4e6", "#edafda", "#93b7e3", "#a5e7f0", "#cbb0e3", "#3f5575", "#41a7cb", "#d58fc4", "#789bc7" ], "visualMapColors": [ "#59c4e6", "#d58fc4" ] } ], "axes": [ { "key": "name" }, { "key": "y", "type": "value" } ], "settings": [ { "type": "bar", "showLabels": true }, { "type": "line" } ], "data": [ { "name": "west", "yAxis": "12" }, { "name": "east", "yAxis": "18" } ]}Examples
<!doctype html><html><head><title>Vizb</title></head><body>...</body></html>The request body is not a single valid JSON value.
object
object
JSON Pointer or header/query name.
Example
{ "errors": [ { "location": "body" } ]}The request's Accept header does not allow an operation's selected response media type.
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}The request body exceeds the 10 MiB limit.
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}The request Content-Type is not application/json.
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Valid JSON violates request schema or semantic constraints, or the supplied input cannot be processed.
object
Examples
{ "type": "https://vizb.goptics.org/problems/validation", "title": "Unprocessable content", "status": 422, "detail": "Request validation failed.", "instance": "/merge", "errors": [ { "location": "body", "path": "/tagAxis", "code": "invalid_enum", "message": "tagAxis must be one of name, x, y, or z." } ]}{ "type": "https://vizb.goptics.org/problems/processing", "title": "Input processing failed", "status": 422, "detail": "The selected columns could not be read from the CSV input.", "instance": "/"}An unexpected server-side failure occurred.
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}