---
title: "Query impact metrics time series data"
method: GET
path: "/api/admin/impact-metrics"
tags: ["Metrics"]
---

# Query impact metrics time series data

`GET /api/admin/impact-metrics`

**Enterprise feature**

Queries an impact metric source for time series data based on the provided metric name, time range, and aggregation mode.

## Query parameters

- `metricName` string, required
- `range` 'hour' | 'day' | 'week' | 'month' | 'threeMonths' | 'sixMonths', required
- `aggregationMode` 'rps' | 'count' | 'avg' | 'sum' | 'p50' | 'p95' | 'p99', required
- `labels` string
- `mode` 'display' | 'edit'
- `source` 'internal' | 'external', required

## Response `200`

impactMetricsDataSchema

- ImpactMetricsDataSchema — Response containing time series data from a metrics source.
  - `start` string, required — The start of the queried time range as a Unix epoch timestamp in seconds.
  - `end` string, required — The end of the queried time range as a Unix epoch timestamp in seconds.
  - `step` string, required — The step interval between data points.
  - `series` object[], required — Array of time series results.
    - `metric` object, required — Label key-value pairs identifying this series.
    - `data` array[], required — Array of [timestamp, value] data points. Timestamps are Unix epoch seconds; values are strings.
      - union[] — A [timestamp, value] tuple. The first element is a Unix timestamp (number), the second is the metric value (string).
        - union
          - number — Unix timestamp in seconds.
          - string — Metric value as a string.
  - `labels` object, required — Available label values for the queried metric, keyed by label name.
  - `debug` object — Internal debug information. This field is not part of the public API and may be removed without notice.
    - `query` string — The PromQL query that was executed.
    - `metricType` string — The resolved metric type.
    - `isTruncated` boolean — Whether the series data was truncated due to limits.

## Other responses

- `401` — Authorization information is missing or invalid. Provide a valid API token as the `authorization` header, e.g. `authorization:*.*.my-admin-token`.
- `403` — The provided user credentials are valid, but the user does not have the necessary permissions to perform this operation
- `404` — The requested resource was not found.

---

[API](https://skmtc.net/unleash/apis/unleash-api-3.md) · [All operations](https://skmtc.net/unleash/apis/unleash-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/unleash/unleash-api-3/versions/b2c3116e633e/schema)
