Skip to content

Merge two or more Vizb Datasets.

POST
/merge
curl --request POST \
--url http://127.0.0.1:8080/merge \
--header 'Content-Type: application/json' \
--data '{ "tagAxis": "x", "datasets": [ { "name": "Sort", "tag": "v1", "axes": [ { "key": "name" }, { "key": "y" } ], "settings": [ { "type": "bar" } ], "data": [ { "name": "quicksort", "yAxis": "12" } ] }, { "name": "Sort", "tag": "v2", "axes": [ { "key": "name" }, { "key": "y" } ], "settings": [ { "type": "bar" } ], "data": [ { "name": "quicksort", "yAxis": "10" } ] } ] }'

The operation is atomic: every supplied Dataset must be valid and take part in the merge. Server file paths and directory scanning are intentionally not part of this API.

Media typeapplication/json
object
datasets
required
Array<object>
>= 2 items
object
id
string
tag
string
timestamp
string
name
required
string
appearance

Dataset-level visual settings. themes[0] is the active theme when the catalog is non-empty. theme is an inbound name or palette expanded into themes and omitted from new output. fontSize is a number (all three targets) or an object of series, legend, and label sizes in CSS pixels.

object
themes
Array<object>

Fully expanded color theme. On Dataset and convert responses, themes[0] is the active theme when the catalog is non-empty.

object
name
required

Theme identifier used by the UI selector.

string
>= 1 characters
colors
required

Categorical series palette.

Array<string>
>= 1 items
visualMapColors
required

Continuous gradient pair (exactly two colors).

Array<string>
>= 2 items <= 2 items
theme
string
>= 1 characters
fontSize
One of:
number
> 0
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
better
string
Allowed values: high low
preserveRows
boolean
tagAxis
string
default: name
Allowed values: name x y z
Examples
ExampletaggedDatasets

Merge two tagged runs and inject tags on the x axis.

{
"tagAxis": "x",
"datasets": [
{
"name": "Sort",
"tag": "v1",
"axes": [
{
"key": "name"
},
{
"key": "y"
}
],
"settings": [
{
"type": "bar"
}
],
"data": [
{
"name": "quicksort",
"yAxis": "12"
}
]
},
{
"name": "Sort",
"tag": "v2",
"axes": [
{
"key": "name"
},
{
"key": "y"
}
],
"settings": [
{
"type": "bar"
}
],
"data": [
{
"name": "quicksort",
"yAxis": "10"
}
]
}
]
}

Merge succeeded. The response is always an array, including when it contains one Dataset.

Media typeapplication/json
Array<object>
object
id
string
tag
string
timestamp
string
name
required
string
appearance

Dataset-level visual settings. themes[0] is the active theme when the catalog is non-empty. theme is an inbound name or palette expanded into themes and omitted from new output. fontSize is a number (all three targets) or an object of series, legend, and label sizes in CSS pixels.

object
themes
Array<object>

Fully expanded color theme. On Dataset and convert responses, themes[0] is the active theme when the catalog is non-empty.

object
name
required

Theme identifier used by the UI selector.

string
>= 1 characters
colors
required

Categorical series palette.

Array<string>
>= 1 items
visualMapColors
required

Continuous gradient pair (exactly two colors).

Array<string>
>= 2 items <= 2 items
theme
string
>= 1 characters
fontSize
One of:
number
> 0
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
better
string
Allowed values: high low
preserveRows
boolean
Examples
ExamplemergedDatasets
[
{
"name": "Sort",
"axes": [
{
"key": "name"
},
{
"key": "x"
},
{
"key": "y"
}
],
"settings": [
{
"type": "bar"
}
],
"data": [
{
"name": "quicksort",
"xAxis": "v1",
"yAxis": "12"
},
{
"name": "quicksort",
"xAxis": "v2",
"yAxis": "10"
}
]
}
]

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"
}