Metrics
Query impact metrics time series data
Changed onEnterprise feature
Queries an impact metric source for time series data based on the provided metric name, time range, and aggregation mode.
get/api/admin/impact-metrics
Request
- Base URLhttps://app.unleash-instance.example.com
- URLhttps://app.unleash-instance.example.com/api/admin/impact-metrics
- Auth
- API key in header Authorization
- or HTTP bearer
Query parameters
metricNamestring required
Example:http_requests_total
The Prometheus metric name to query.
range'hour' | 'day' | 'week' | 'month' | 'threeMonths' | 'sixMonths' required
Example:day
The time range for the query.
aggregationMode'rps' | 'count' | 'avg' | 'sum' | 'p50' | 'p95' | 'p99' required
Example:rps
The aggregation mode for the query.
labelsstring
Example:{"endpoint":["/api/admin"]}
A JSON-encoded object mapping label names to arrays of label values to filter by.
mode'display' | 'edit'
Example:display
Query mode. edit (default) also returns the available labels for the metric (used by filter UIs). display skips label discovery and returns time-series data only (cheaper; use for dashboard rendering).
source'internal' | 'external' required
Example:external
Whether the metric comes from the internal Unleash impact metrics or an external source.
Response
impactMetricsDataSchema
Example response
{
"start": "1712745600",
"end": "1712832000",
"step": "15m"
}Changes
- info
endpoint added
- info