Skip to content

Convert supported input into a Vizb Dataset or self-contained HTML.

POST
/
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.

Media typeapplication/json
object
input
required
One of:
string
id

Dataset identifier used by UI deep links.

string
name

Dataset display name.

string
default: Comparisons
description

Dataset description.

string
tag

Dataset tag or run identifier.

string
theme

Built-in theme name or a comma-separated palette of at least two hex colors.

string
default: default >= 1 characters
parser
string
default: auto
Allowed values: auto csv json go javascript rust
grouping
object
pattern
string
>= 1 characters
regex
string
columns
Array<string>
filter
string
units
object
memory
string
Allowed values: b B KB MB GB
time
string
Allowed values: ns us ms s
number
string
Allowed values: K M B T
select

Structured column selections; each item is one select expression.

Array<string>
jsonPath

JSON-only path to a nested array.

string
charts
object
types
Array<string>
>= 1 items unique items
Allowed values: bar line scatter pie heatmap radar
configs
Array
One of: discriminator: type
object
type
required
Allowed value: bar
swap
string
sort
object
enabled
required
boolean
order
required
string
Allowed values: asc desc
scale
string
Allowed values: linear log
stack
boolean
showLabels
boolean
threeDRotate
boolean
threeD
boolean
threeDVisualMap
boolean
horizontal
boolean
stat
object
enabled
required
boolean
math
required
Array<string>
Allowed values: counts center spread extremes shape percentiles confidence correlations
output
object
format
string
default: dataset
Allowed values: dataset html
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"
}
}

Conversion succeeded. The response media type is selected by output.format and must be acceptable to the client.

object
id
string
tag
string
timestamp
string
name
required
string
theme
string
history
Array<object>
object
tag
required
string
timestamp
required
string
meta
object
cpu
object
name
string
cores
integer
os
string
arch
string
pkg
string
description
string
meta
object
cpu
object
name
string
cores
integer
os
string
arch
string
pkg
string
axes
required
Array<object>
object
key
required
string
Allowed values: name x y z
label
string
type
string
Allowed values: "" value
settings
required

Each chart type may appear at most once.

data
required
Array<object>
object
name
string
xAxis
string
yAxis
string
zAxis
string
metric
string
stats
Array<object>
object
type
string
value
number
symbol
string
preserveRows
boolean
Examples
ExampleconvertedDataset
{
"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"
}
]
}

The request body is not a single valid JSON value.

Media typeapplication/problem+json
object
type
required
string format: uri-reference
title
required
string
status
required
integer
detail
required
string
instance
string format: uri-reference
errors
required
Array<object>
>= 1 items
object
location
required
string
Allowed values: body header query
path
required

JSON Pointer or header/query name.

string
code
required
string
message
required
string
Example
{
"errors": [
{
"location": "body"
}
]
}

The request’s Accept header does not allow an operation’s selected response media type.

Media typeapplication/problem+json
object
type
required
string format: uri-reference
title
required
string
status
required
integer
detail
required
string
instance
string format: uri-reference
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

The request body exceeds the 10 MiB limit.

Media typeapplication/problem+json
object
type
required
string format: uri-reference
title
required
string
status
required
integer
detail
required
string
instance
string format: uri-reference
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

The request Content-Type is not application/json.

Media typeapplication/problem+json
object
type
required
string format: uri-reference
title
required
string
status
required
integer
detail
required
string
instance
string format: uri-reference
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.

Media typeapplication/problem+json
object
type
required
string format: uri-reference
title
required
string
status
required
integer
detail
required
string
instance
string format: uri-reference
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."
}
]
}

An unexpected server-side failure occurred.

Media typeapplication/problem+json
object
type
required
string format: uri-reference
title
required
string
status
required
integer
detail
required
string
instance
string format: uri-reference
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}