v7

latestOpenAPI 3.0.3raw.githubusercontent.com2026-08-013764062.2 MB
Metrics

Save instance level impact metrics configuration

Enterprise feature

Saves a configuration for an instance level impact metric chart without a feature flag

post/api/admin/impact-metrics/config

Request body

idstring

The unique ULID identifier for this impact metric configuration. Generated automatically if not provided.

metricNamestring required

The Prometheus metric series to query. It includes both unleash prefix and metric type and display name

timeRange'hour' | 'day' | 'week' | 'month' required

The time range for the metric data.

yAxisMin'auto' | 'zero' required

Whether the chart should begin at zero on the y-axis.

aggregationMode'rps' | 'count' | 'avg' | 'sum' | 'p95' | 'p99' | 'p50' required

The aggregation mode for the metric data.

labelSelectorsobject required

The selected labels and their values for filtering the metric data.

titlestring

Optional title for the impact metric chart.

source'internal' | 'external'

The Prometheus data source for this metric. Defaults to internal.

Example request

{
  "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
  "metricName": "unleash_counter_feature_toggle_usage_total",
  "timeRange": "day",
  "yAxisMin": "auto",
  "aggregationMode": "rps",
  "labelSelectors": {
    "environment": [
      "development"
    ],
    "project": [
      "default"
    ]
  },
  "title": "Feature Toggle Usage",
  "source": "internal"
}

Response

impactMetricsConfigSchema

idstring required

The unique ULID identifier for this impact metric configuration. Generated automatically if not provided.

metricNamestring required

The Prometheus metric series to query. It includes both unleash prefix and metric type and display name

timeRange'hour' | 'day' | 'week' | 'month' required

The time range for the metric data.

aggregationMode'rps' | 'count' | 'avg' | 'sum' | 'p95' | 'p99' | 'p50' required

The aggregation mode for the metric data.

labelSelectorsobject required

The selected labels and their values for filtering the metric data.

source'internal' | 'external'

The Prometheus data source for this metric. Defaults to internal.

displayNamestring required

The human readable display name of the impact metric

yAxisMin'auto' | 'zero' required

Whether the chart should begin at zero on the y-axis.

step'1m' | '15m' | '3h' | '1d' nullable

The step interval for querying metrics data. This is automatically calculated from the timeRange and stored when the metric is created or updated.

titlestring

Optional title for the impact metric chart.

mode'read' | 'write'

The access mode for this impact metric configuration: "read" when referenced by a safeguard, "write" otherwise.

Example response

{
  "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
  "metricName": "unleash_counter_feature_toggle_usage_total",
  "timeRange": "day",
  "aggregationMode": "rps",
  "labelSelectors": {
    "environment": [
      "development"
    ],
    "project": [
      "default"
    ]
  },
  "source": "internal",
  "displayName": "feature_toggle_usage_total",
  "yAxisMin": "auto",
  "step": "15m",
  "title": "Feature Toggle Usage",
  "mode": "write"
}