Generate a self-contained Vizb HTML application from Datasets.
const url = 'http://127.0.0.1:8080/ui';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"datasets":{"name":"API latency","axes":[{"key":"name"},{"key":"y","type":"value"}],"settings":[{"type":"line","smooth":true}],"data":[{"name":"west","yAxis":"12"},{"name":"east","yAxis":"18"}]},"charts":{"types":["line"]}}'};
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/ui \ --header 'Content-Type: application/json' \ --data '{ "datasets": { "name": "API latency", "axes": [ { "key": "name" }, { "key": "y", "type": "value" } ], "settings": [ { "type": "line", "smooth": true } ], "data": [ { "name": "west", "yAxis": "12" }, { "name": "east", "yAxis": "18" } ] }, "charts": { "types": [ "line" ] } }'The request accepts one Dataset or a non-empty Dataset array. The generated response is returned directly and is never stored by the server. Remote data URLs are deliberately absent from the request model.
Request Bodyrequired
Section titled “Request Bodyrequired”object
object
object
object
object
object
object
object
Each chart type may appear at most once.
object
object
object
object
object
object
object
object
object
Each chart type may appear at most once.
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Examples
Render one Dataset with a filtered chart set.
{ "datasets": { "name": "API latency", "axes": [ { "key": "name" }, { "key": "y", "type": "value" } ], "settings": [ { "type": "line", "smooth": true } ], "data": [ { "name": "west", "yAxis": "12" }, { "name": "east", "yAxis": "18" } ] }, "charts": { "types": [ "line" ] }}Responses
Section titled “Responses”Self-contained HTML was generated successfully.
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"}