Skip to content

Run up to 50 widgets. Scoped callers need each source's read scope, such as `read:logs`; widgets lacking a scope return `denied`. Invalid requests fail the entire call.

POST
/dashboards/query
curl --request POST \
--url https://api.siteqwality.com/dashboards/query \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "time": { "from": "example", "to": "example" }, "timezone": "example", "variables": { "additionalProperty": [ "example" ] }, "widgets": [ { "widget": { "config": { "queries": [ { "id": "example", "source": "monitors", "measure": "example", "aggregation": "avg", "filters": [ { "field": "example", "op": "in", "values": [ "example" ] } ], "group_by": [ "example" ], "metric": "example", "hidden": true, "alias": "example" } ], "formulas": [ { "id": "example", "expr": "example", "alias": "example", "unit": "ms", "hidden": true } ], "display": "line", "stacked": true, "series_limit": 1, "legend": "auto", "legend_columns": [ "value" ], "y_axis": { "min": 1, "max": 1, "scale": "linear", "include_zero": true }, "unit": "ms", "decimals": 1, "thresholds": [ { "value": 1, "tone": "ok", "style": "line", "label": "example" } ], "compare": "previous_period", "overlays": [ "incidents" ], "palette": "categorical" }, "type": "timeseries", "id": "example", "title": "example", "description": "example", "layout": { "x": 1, "y": 1, "w": 1, "h": 1 }, "time": { "from": "example", "to": "example" } }, "max_points": 1 } ] }'
Media type application/json
object
time
required

A window of T2 tokens (now, now-2h) or instants (ISO 8601, epoch milliseconds), resolved when the query is compiled, so a stored view stays rolling.

object
from
required
string
to
required
string
timezone
string | null
variables
object
key
additional properties
Array<string>
widgets
required
Array<object>
object
widget
required
object
One of:
object
config
required
object
queries
required
Array<object>
object
id
required
string
source
required
string
Allowed values: monitors incidents rum logs metrics traces
measure
required
string
aggregation
One of:
null
filters
Array<object>
object
field
required
string
op
required
string
Allowed values: in not_in contains not_contains gt gte lt lte
values
required
Array<string>
group_by
Array<string>
metric

Metrics source only: the metric name (or $var).

string | null
hidden
boolean
alias
string | null
formulas
Array<object>
object
id
required
string
expr
required
string
alias
string | null
unit
One of:
null
hidden
boolean
display
string
Allowed values: line area bars
stacked
boolean
series_limit
integer format: int32
legend
string
Allowed values: auto table compact none
legend_columns
Array<string>
Allowed values: value avg min max sum
y_axis
One of:
null
unit
One of:
null
decimals
integer | null format: int32
thresholds
Array<object>

A horizontal marker on a time series.

object
value
required
number format: double
tone
required
string
Allowed values: ok warn danger
style
string
Allowed values: line band
label
string | null
compare
One of:
null
overlays
Array<string>
Allowed values: incidents downtime
palette
string
Allowed values: categorical cool warm status
type
required
string
Allowed values: timeseries
id
required
string
title
string | null
description
string | null
layout
required
object
x
required
integer format: int32
y
required
integer format: int32
w
required
integer format: int32
h
required
integer format: int32
time
One of:
null
max_points
integer | null format: int32

One result per widget

Media type application/json
object
now
required
string format: date-time
results
required
Array<object>
object
id
required
string
status
required
string
Allowed values: ok error timeout denied
error
string | null
window
One of:
null
approximate
required
boolean
warnings
required
Array<string>
data
One of:
null
Example
{
"results": [
{
"status": "ok",
"data": {
"series": [
{
"unit": "ms"
}
],
"events": [
{
"kind": "incident"
}
],
"kind": "timeseries"
}
}
]
}

Invalid request; data.path points at the problem

Missing or invalid authentication

Custom dashboards require a paid plan

Internal server error