Skip to content

Analytics and dashboards API Since v0.2 ​

Every route here needs only viewer. Saved filters and dashboards belong to the caller. A caller with the operator role and access to every application may also share them. A caller with the viewer role cannot use fields that hold request values in filters or group-by, and gets masked group keys. For the settings, see Analytics, analyst and helper processes.

For the base URL, sign-in, roles and error format, see Management API. Except sign-in, a route answers 401 without credentials and 403 when the role is too low.

Routes ​

Queries ​

MethodPathMinimum roleWhat it doesMain fields
GET/v1/analytics/fieldsviewerLists the fields each source offers to queries.none
POST/v1/analytics/queryviewerRuns one query: top values, a time series, a histogram or a count.Body: source, kind (top, series, histogram, count), q, from, to, app, node. Response: the result for kind.
POST/v1/analytics/batchviewerRuns several queries in one call.Body: queries (a list of query bodies).
POST/v1/analytics/validateviewerChecks query text and reports problems with positions.Body: source, q.
POST/v1/analytics/to-ruleoperatorTurns a query into a custom rule draft. Nothing is applied. Needs operator.Body: source, q, name.

Saved filters ​

MethodPathMinimum roleWhat it doesMain fields
GET/v1/filtersviewerLists saved filters.none
POST/v1/filtersviewerSaves a filter.Body: filter name, source and query.
GET/v1/filters/{id}viewerReturns one saved filter.none
PUT/v1/filters/{id}viewerChanges a saved filter.Body: as create.
DELETE/v1/filters/{id}viewerDeletes a saved filter.none

Dashboards ​

MethodPathMinimum roleWhat it doesMain fields
GET/v1/dashboardsviewerLists dashboards.none
POST/v1/dashboardsviewerCreates a dashboard.Body: dashboard name and widgets.
GET/v1/dashboards/templatesviewerLists dashboard templates.none
POST/v1/dashboards/importviewerImports a dashboard from an exported document.Body: the exported dashboard.
GET/v1/dashboards/{id}viewerReturns one dashboard.none
PUT/v1/dashboards/{id}viewerChanges a dashboard.Body: as create.
DELETE/v1/dashboards/{id}viewerDeletes a dashboard.none
POST/v1/dashboards/{id}/duplicateviewerCopies a dashboard.Body: name (optional).

Example ​

sh
curl -sk -X POST -H "Authorization: Bearer waap_EXAMPLE" -H "Content-Type: application/json" -d '{"source":"events","kind":"top","q":"action = block","from":"-24h"}' https://127.0.0.1:9443/v1/analytics/query