# Get impact metrics configuration for the instance GET https://app.unleash-instance.example.com/api/admin/impact-metrics/config **Enterprise feature** Gets all impact metrics configurations now associated with any feature flag. Reference: https://docs.getunleash.io/api/get-instance-impact-metrics-configs ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Get impact metrics configuration for the instance version: endpoint_unstable.getInstanceImpactMetricsConfigs paths: /api/admin/impact-metrics/config: get: operationId: get-instance-impact-metrics-configs summary: Get impact metrics configuration for the instance description: >- **Enterprise feature** Gets all impact metrics configurations now associated with any feature flag. tags: - - subpackage_unstable parameters: - name: Authorization in: header description: Header authentication of the form `undefined ` required: true schema: type: string responses: '200': description: impactMetricsConfigListSchema content: application/json: schema: $ref: '#/components/schemas/impactMetricsConfigListSchema' components: schemas: ImpactMetricsConfigSchemaTimeRange: type: string enum: - value: hour - value: day - value: week - value: month ImpactMetricsConfigSchemaAggregationMode: type: string enum: - value: rps - value: count - value: avg - value: sum - value: p95 - value: p99 - value: p50 ImpactMetricsConfigSchemaType: type: string enum: - value: counter - value: gauge - value: histogram - value: unknown ImpactMetricsConfigSchemaYAxisMin: type: string enum: - value: auto - value: zero ImpactMetricsConfigSchemaStep: type: string enum: - value: 1m - value: 15m - value: 3h - value: 1d ImpactMetricsConfigSchemaMode: type: string enum: - value: read - value: write impactMetricsConfigSchema: type: object properties: id: type: string description: >- The unique ULID identifier for this impact metric configuration. Generated automatically if not provided. metricName: type: string description: >- The Prometheus metric series to query. It includes both unleash prefix and metric type and display name timeRange: $ref: '#/components/schemas/ImpactMetricsConfigSchemaTimeRange' description: The time range for the metric data. aggregationMode: $ref: '#/components/schemas/ImpactMetricsConfigSchemaAggregationMode' description: The aggregation mode for the metric data. labelSelectors: type: object additionalProperties: type: array items: type: string description: The selected labels and their values for filtering the metric data. type: $ref: '#/components/schemas/ImpactMetricsConfigSchemaType' description: The type of metric displayName: type: string description: The human readable display name of the impact metric yAxisMin: $ref: '#/components/schemas/ImpactMetricsConfigSchemaYAxisMin' description: Whether the chart should begin at zero on the y-axis. step: oneOf: - $ref: '#/components/schemas/ImpactMetricsConfigSchemaStep' - type: 'null' description: >- The step interval for querying metrics data. This is automatically calculated from the timeRange and stored when the metric is created or updated. title: type: string description: Optional title for the impact metric chart. mode: $ref: '#/components/schemas/ImpactMetricsConfigSchemaMode' description: >- The access mode for this impact metric configuration: "read" when referenced by a safeguard, "write" otherwise. required: - id - metricName - timeRange - aggregationMode - labelSelectors - type - displayName - yAxisMin impactMetricsConfigListSchema: type: object properties: configs: type: array items: $ref: '#/components/schemas/impactMetricsConfigSchema' description: The list of impact metrics configurations. required: - configs ``` ## SDK Code Examples ```python import requests url = "https://app.unleash-instance.example.com/api/admin/impact-metrics/config" headers = {"Authorization": ""} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://app.unleash-instance.example.com/api/admin/impact-metrics/config'; const options = {method: 'GET', headers: {Authorization: ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://app.unleash-instance.example.com/api/admin/impact-metrics/config" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://app.unleash-instance.example.com/api/admin/impact-metrics/config") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = '' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://app.unleash-instance.example.com/api/admin/impact-metrics/config") .header("Authorization", "") .asString(); ``` ```php request('GET', 'https://app.unleash-instance.example.com/api/admin/impact-metrics/config', [ 'headers' => [ 'Authorization' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://app.unleash-instance.example.com/api/admin/impact-metrics/config"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", ""); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://app.unleash-instance.example.com/api/admin/impact-metrics/config")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```