---
title: "Get performance metrics"
method: GET
path: "/clusters/{cluster_id}/insights/performance"
tags: ["Cluster Insights"]
---

# Get performance metrics

`GET /clusters/{cluster_id}/insights/performance`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/clusters/{cluster_id}/insights/performance`
- Auth: API key in header `API-Key`

Returns CPU utilization, JVM heap usage, response time percentiles,
garbage collection overhead, and live thread count.

When neither `start_time` nor `end_time` is provided the window covers the last 24 hours.

Required scope: `clusters:insights:read`

## Path parameters

- `cluster_id` string, uuid, required

## Query parameters

- `realm` string: Keycloak realm name (not ID). Must start with a letter; allows letters, digits, and hyphens.
- `start_time` string, date-time
- `end_time` string, date-time

## Headers

- `API-Version` '2026-06-01.beta', required

## Response `200`

The request has succeeded.

- PerformanceMetrics: System performance metrics over the requested time window.
  - `response_times` ResponseTimeMetrics, required: Response time statistics for authentication endpoints.
    - `average` MetricSeries, required
      - `values` MetricValue[], required
        - `timestamp` string, date-time, required
        - `value` number, double, required
    - `p50` MetricSeries, required
      - `values` MetricValue[], required
        - `timestamp` string, date-time, required
        - `value` number, double, required
    - `p95` MetricSeries, required
      - `values` MetricValue[], required
        - `timestamp` string, date-time, required
        - `value` number, double, required
    - `p99` MetricSeries, required
      - `values` MetricValue[], required
        - `timestamp` string, date-time, required
        - `value` number, double, required
    - `by_endpoint` EndpointStat[], required: Per-endpoint breakdown for the top auth endpoints by request volume.
      - `endpoint` string, required: Endpoint path pattern.
      - `count` integer, required
      - `avg_time` number, double, required: Mean response time, in milliseconds.
      - `p95_time` number, double, required: 95th percentile response time, in milliseconds.
  - `memory_usage` MetricSeries, required
    - `values` MetricValue[], required
      - `timestamp` string, date-time, required
      - `value` number, double, required
  - `cpu_usage` MetricSeries, required
    - `values` MetricValue[], required
      - `timestamp` string, date-time, required
      - `value` number, double, required
  - `max_cpu_usage` MetricSeries, required
    - `values` MetricValue[], required
      - `timestamp` string, date-time, required
      - `value` number, double, required
  - `garbage_collection` MetricSeries, required
    - `values` MetricValue[], required
      - `timestamp` string, date-time, required
      - `value` number, double, required
  - `thread_count` MetricSeries, required
    - `values` MetricValue[], required
      - `timestamp` string, date-time, required
      - `value` number, double, required

## Other responses

- `400`: The server could not understand the request due to invalid syntax.
- `401`: Access is unauthorized.
- `403`: Access is forbidden.
- `404`: The server cannot find the requested resource.
- `422`: Client error
- `429`: Client error
- `500`: Server error
- `501`: Server error

---

[API](https://skmtc.dev/skycloak/apis/skycloak-public-api.md) · [All operations](https://skmtc.dev/skycloak/apis/skycloak-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/skycloak/apis/skycloak-public-api/revisions/33a69e2ce35f?raw)
