Metrics
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
GET | |
GET | |
POST | |
GET | |
POST | |
GET | |
POST | |
GET | |
GET | |
GET | |
GET | |
POST |
Retrieve metrics attribute values
Observed values for one metric attribute key, most frequent first.
Backs the filter bar's value autocomplete. metricName limits choices
to one metric.
Required API key scopes
metrics:readQuery parameters
- dateFromstring | null
- dateTostring | null
- keystring
- limitintegerDefault:
100 - metricNamestringDefault:
- valuestringDefault:
Response
Example request
GET /api /projects /:project_id /metrics /attribute_valuesExample response
Status 200
Retrieve metrics attribute values
Observed values for one metric attribute key, most frequent first.
Backs the filter bar's value autocomplete. metricName limits choices
to one metric.
Required API key scopes
metrics:readQuery parameters
- dateFromstring | null
- dateTostring | null
- keystring
- limitintegerDefault:
100 - metricNamestringDefault:
- valuestringDefault:
Response
Example request
GET /api /projects /:project_id /metrics /attribute_valuesExample response
Status 200
Retrieve metrics attributes
Attribute keys ordered by distinct series count, from highest to
lowest. metricName limits choices to one metric.
Required API key scopes
metrics:readQuery parameters
- dateFromstring | null
- dateTostring | null
- limitintegerDefault:
100 - metricNamestringDefault:
- searchstringDefault:
Response
Example request
GET /api /projects /:project_id /metrics /attributesExample response
Status 200
Retrieve metrics attributes
Attribute keys ordered by distinct series count, from highest to
lowest. metricName limits choices to one metric.
Required API key scopes
metrics:readQuery parameters
- dateFromstring | null
- dateTostring | null
- limitintegerDefault:
100 - metricNamestringDefault:
- searchstringDefault:
Response
Example request
GET /api /projects /:project_id /metrics /attributesExample response
Status 200
Create metrics characterize
Characterize a metric anomaly: compare an anomaly window against a baseline, find the onset, and rank which label values moved.
Required API key scopes
metrics:readRequest parameters
- query
Response
Example request
POST /api /projects /:project_id /metrics /characterizeExample response
Status 200
Create metrics characterize
Characterize a metric anomaly: compare an anomaly window against a baseline, find the onset, and rank which label values moved.
Required API key scopes
metrics:readRequest parameters
- query
Response
Example request
POST /api /projects /:project_id /metrics /characterizeExample response
Status 200
List all metrics dashboard imports
The user's dashboard imports of the last 7 days that used the agent, with the progress of the ones that run.
Required API key scopes
metrics:readExample request
GET /api /projects /:project_id /metrics /dashboard_importsExample response
Status 200
Create metrics dashboard imports
Import a Grafana dashboard JSON model or a dashboard screenshot as a new dashboard. Panels that match the project's metrics import at once. An AI agent converts the rest, and the response then has an id to poll.
Required API key scopes
metrics:readdashboard:writeinsight:writeRequest parameters
- source
- namestring
- grafana_jsonstring
- image_base64string
Response
Example request
POST /api /projects /:project_id /metrics /dashboard_importsExample response
Status 201
Status 403 AI data processing is off, the AI credits ran out, or no access.
Status 409 The user already has 3 imports that are running.
Retrieve metrics dashboard imports
Status of one of the user's dashboard imports. Poll it until the status is not 'running'.
Required API key scopes
metrics:readPath parameters
- idstring
Response
Example request
GET /api /projects /:project_id /metrics /dashboard_imports /:idExample response
Status 200
Create metrics dashboard imports validate
Check dashboard panel queries before they go on a dashboard: the metrics must exist, PromQL must run, and SQL must compile and read only logs or traces.
Required API key scopes
metrics:readRequest parameters
- panelsarray
- import_idstring | null
Response
Example request
POST /api /projects /:project_id /metrics /dashboard_imports /validateExample response
Status 200
Retrieve metrics error spikes
Error Tracking issue spikes detected in a time window — backs the metrics chart's error-spike overlay (PoC). Team-wide: not yet scoped to the metric's own service.
Required API key scopes
metrics:readerror_tracking:readQuery parameters
- dateFromstring
- dateTostring
Response
Example request
GET /api /projects /:project_id /metrics /error_spikesExample response
Status 200
Retrieve metrics error spikes
Error Tracking issue spikes detected in a time window — backs the metrics chart's error-spike overlay (PoC). Team-wide: not yet scoped to the metric's own service.
Required API key scopes
metrics:readerror_tracking:readQuery parameters
- dateFromstring
- dateTostring
Response
Example request
GET /api /projects /:project_id /metrics /error_spikesExample response
Status 200
Retrieve metrics has metrics
Required API key scopes
metrics:readResponse
Example request
GET /api /projects /:project_id /metrics /has_metricsExample response
Status 200
Retrieve metrics has metrics
Required API key scopes
metrics:readResponse
Example request
GET /api /projects /:project_id /metrics /has_metricsExample response
Status 200
Retrieve metrics names
Distinct metric names for the viewer picker, without sparklines or caching.
Required API key scopes
metrics:readQuery parameters
- limitintegerDefault:
100 - servicestring
- valuestringDefault:
Response
Example request
GET /api /projects /:project_id /metrics /namesExample response
Status 200
Retrieve metrics names
Distinct metric names for the viewer picker, without sparklines or caching.
Required API key scopes
metrics:readQuery parameters
- limitintegerDefault:
100 - servicestring
- valuestringDefault:
Response
Example request
GET /api /projects /:project_id /metrics /namesExample response
Status 200
Retrieve metrics overview
Ingestion rollup for the overview page: freshness of the newest datapoint plus per-service metric/series counts over the last day.
Required API key scopes
metrics:readResponse
Example request
GET /api /projects /:project_id /metrics /overviewExample response
Status 200
Retrieve metrics overview
Ingestion rollup for the overview page: freshness of the newest datapoint plus per-service metric/series counts over the last day.
Required API key scopes
metrics:readResponse
Example request
GET /api /projects /:project_id /metrics /overviewExample response
Status 200
Create metrics query
Required API key scopes
metrics:readRequest parameters
- query
Response
Example request
POST /api /projects /:project_id /metrics /queryExample response
Status 200
Create metrics query
Required API key scopes
metrics:readRequest parameters
- query
Response
Example request
POST /api /projects /:project_id /metrics /query










