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.
Dataset description.
Dataset tag or run identifier.
Built-in theme name or a comma-separated palette of at least two hex colors.
object
object
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
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 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
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", "theme": "westeros", "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"}