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.
const url = 'https://api.siteqwality.com/dashboards/query';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"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}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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 } ] }'Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”object
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
object
object
object
object
object
object
object
Metrics source only: the metric name (or $var).
A horizontal marker on a time series.
object
object
object
object
object
Metrics source only: the metric name (or $var).
A conditional colour on a value (query value, toplist, table cells).
object
object
object
object
object
Metrics source only: the metric name (or $var).
A query or formula id; defaults to the first visible one.
A conditional colour on a value (query value, toplist, table cells).
object
object
object
object
object
Metrics source only: the metric name (or $var).
Empty means one number column per visible query and formula.
object
A query or formula id.
A conditional colour on a value (query value, toplist, table cells).
object
object
object
object
object
Metrics source only: the metric name (or $var).
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Responses
Section titled “ Responses ”One result per widget
object
object
object
object
The query or formula id.
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
YYYY-MM-DD in the request timezone.
object
object
object
object
object
object
RFC 3339 with nanoseconds as stored.
object
object
object
object
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