---
title: "Get event analytics"
method: GET
path: "/clusters/{cluster_id}/insights/events"
tags: ["Cluster Insights"]
---

# Get event analytics

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

## Request

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

Returns user activity analytics (MAU/WAU/DAU), login trends, protocol breakdown,
registration statistics, and machine-to-machine authentication analytics from
the events store.

Note: `active_users` counts use fixed 30/7/1-day rolling windows and are not
affected by `start_time`/`end_time`.

When neither `start_time` nor `end_time` is provided the window covers the last 30 days.

Required scope: `clusters:insights:read`

## Path parameters

- `cluster_id` string, uuid, required

## Query parameters

- `start_time` string, date-time
- `end_time` string, date-time

## Headers

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

## Response `200`

The request has succeeded.

- EventsAnalytics: User activity and login event analytics from the events store.
  - `active_users` ActiveUserCounts, required: Active user counts across fixed rolling time windows.
    - `monthly` integer, required: Distinct users who logged in during the last 30 days.
    - `weekly` integer, required: Distinct users who logged in during the last 7 days.
    - `daily` integer, required: Distinct users who logged in during the last 24 hours.
  - `total_logins` integer, required
  - `total_login_attempts` integer, required
  - `success_rate` number, double, required: Overall login success rate (0–1).
  - `top_realms` RealmStats[], required: Realms ranked by login volume.
    - `realm_id` string, required
    - `realm_name` string, required
    - `user_count` integer, required
    - `login_count` integer, required
  - `login_trends` EventTimeSeriesPoint[], required
    - `timestamp` string, date-time, required
    - `value` integer, required
  - `protocol_stats` ProtocolStat[], required
    - `protocol` string, required
    - `count` integer, required
    - `rate` number, double, required: Fraction of total login events for this protocol (0–1).
  - `registrations` RegistrationAnalytics, required: User registration analytics.
    - `total_registrations` integer, required
    - `total_registration_attempts` integer, required
    - `registration_success_rate` number, double, required: Ratio of successful registrations to total attempts (0–1).
    - `registration_trends` EventTimeSeriesPoint[], required
      - `timestamp` string, date-time, required
      - `value` integer, required
  - `machine_to_machine` MachineToMachineAnalytics, required: Machine-to-machine (client credentials grant) authentication analytics.
    - `monthly_active_clients` integer, required: Distinct clients that authenticated during the last 30 days.
    - `weekly_active_clients` integer, required: Distinct clients that authenticated during the last 7 days.
    - `daily_active_clients` integer, required: Distinct clients that authenticated during the last 24 hours.
    - `total_client_logins` integer, required
    - `total_client_attempts` integer, required
    - `client_success_rate` number, double, required: Ratio of successful client authentications to total attempts (0–1).
    - `total_client_registrations` integer, required
    - `total_client_registration_attempts` integer, required
    - `client_registration_success_rate` number, double, required: Ratio of successful client registrations to total attempts (0–1).
    - `top_clients` ClientStats[], required
      - `client_id` string, required
      - `client_name` string, required
      - `login_count` integer, required
      - `realm_name` string, required
    - `client_login_trends` EventTimeSeriesPoint[], required
      - `timestamp` string, date-time, required
      - `value` integer, 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)
