Create a dashboard
Create a dashboard
Dashboards are data — build them in CI, not by dragging.
Every element is an LSQL query plus a chart type. That makes a dashboard a JSON file you can review in a pull request — see dashboards as code.
POST
/v1/dashboardsBody parameters
namestringrequiredShown in the dashboard list.
time_rangestringdefault 1hDefault window, e.g. 1h, 24h, 7d.
elementsarrayrequiredThe charts.
typeenumrequiredChart kind.
timeseriestablestatisticgaugeheatmappielog-streamnote
titlestringrequiredElement heading.
aplstringrequiredThe query behind it.
widthintegerdefault 6Grid columns out of 12.
variablesarrayTemplate variables — see variables.
curl -X POST https://api.logstreem.com/v1/dashboards \
-H "Authorization: Bearer $LOGSTREEM_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Service health","time_range":"1h","elements":[{"type":"timeseries","title":"Errors","apl":"['api-gateway-prod']\n| where status >= 500\n| summarize count() by bin_auto(_time), service","width":12}]}'Responses
201Created
{
"object": "dashboard",
"id": "dsh_4a81e0c3f6a5b2d1e0c9",
"name": "Service health",
"datasets": ["api-gateway-prod"],
"elements": 1,
"time_range": "1h",
"created_at": "2026-09-06T09:14:22.114Z"
}401Unauthorized
{
"error": {
"type": "authentication_error",
"code": "missing_token",
"message": "No API token provided.",
"doc_url": "https://logstreem.com/docs/errors#missing_token",
"request_id": "req_9f3c2a7b41de08c5b2e6"
}
}Try itsandbox