List cluster events
const url = 'http://localhost:8000/clusters/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/events?limit=20&offset=0&category=user&realm=customer-portal&order=desc';
const options = {
method: 'GET',
headers: {'API-Version': '2026-06-01.beta', 'API-Key': '<API-Key>'}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}curl --request GET \
--url 'http://localhost:8000/clusters/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/events?limit=20&offset=0&category=user&realm=customer-portal&order=desc' \
--header 'API-Key: <API-Key>' \
--header 'API-Version: 2026-06-01.beta'Returns Keycloak user and admin events for the cluster, sorted by timestamp (newest first by default).
When neither start_time nor end_time is provided the query covers the last 24 hours.
The maximum date range is 90 days.
Required scope: clusters:events:read
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Maximum number of results to return.
Number of results to skip from the start.
Inclusive start time (ISO 8601). Defaults to 24 hours ago when omitted.
Inclusive end time (ISO 8601). Defaults to the current time when omitted.
Keycloak event category.
Filter to a specific event category. Returns both categories when omitted.
Keycloak realm name (not ID). Must start with a letter; allows letters, digits, and hyphens.
Example
customer-portalFilter by realm name.
Filter by realm UUID.
Filter by one or more OAuth2 client IDs. Accepts multiple values.
Filter by Keycloak user UUID. Applies to user events only.
Filter by username prefix (case-sensitive). Applies to user events only.
Filter by user event type. Accepts multiple values. Applies to user events only. Mutually exclusive with operation_types.
Filter by admin operation type. Accepts multiple values. Applies to admin events only. Mutually exclusive with types.
Filter by error code. Applies to user events only.
Case-insensitive substring search across username, client_id, realm_name, and ip_address.
Sort order by timestamp. Defaults to desc (newest first).
Header Parameters
Section titled “Header Parameters”Responses
Section titled “Responses”The request has succeeded.
A Keycloak event recorded for a cluster. Fields present depend on category: user-event fields are absent for admin events and vice versa.
object
Keycloak event category.
OAuth2 client ID.
Source IP address of the request.
GeoIP data resolved from ip_address.
object
ISO 3166-1 alpha-2 country code.
User event type code. Present when category is user.
Keycloak user UUID. Present when category is user.
On a user event, the user the event is about. On an admin event, the administrator who performed the action, when the audit pipeline resolved a name for them.
OAuth2 session identifier. Present when category is user.
Authentication method. Present when category is user.
Federated identity provider alias, when an external login was used. Present when category is user.
OAuth2 grant type. Present when category is user.
Whether this was a machine-to-machine (client credentials grant) authentication. Present when category is user.
Error code for failed events (e.g. invalid_user_credentials). Present when category is user and the event represents a failure.
Admin operation type (e.g. CREATE, UPDATE, DELETE). Present when category is admin.
Type of resource affected (e.g. USER, REALM, CLIENT, GROUP). Present when category is admin.
Full resource path. Present when category is admin.
Keycloak UUID of the administrator who performed the action. Present when
category is admin and Keycloak recorded an authenticated actor.
Distinct from user_id, which on a user event is the subject of the event.
On an admin event the subject is identified by resource_path instead, so
the actor needs a field of its own.
A UUID. The actor’s name, when the audit pipeline resolved one, is on
username; a federated administrator has no UUID id, so username may be
present while this is absent.
Example
[
{
"category": "user",
"geo": {
"country_code": "US",
"country": "United States",
"city": "New York",
"latitude": 40.7128,
"longitude": -74.006
},
"type": "LOGIN",
"auth_method": "openid-connect",
"grant_type": "authorization_code",
"error": "invalid_user_credentials",
"operation_type": "CREATE",
"resource_type": "USER",
"resource_path": "/users/550e8400-e29b-41d4-a716-446655440000"
}
]Headers
Section titled “Headers”Total number of results across all pages, before pagination is applied.
RFC 8288 Link header containing next, prev, first, and last relations.
The server could not understand the request due to invalid syntax.
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Access is unauthorized.
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Access is forbidden.
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}The server cannot find the requested resource.
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Client error
object
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com",
"errors": [
{
"field": "example",
"detail": "example",
"code": "example",
"value": "example"
}
]
}Client error
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Headers
Section titled “Headers”Server error
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Server error
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}