Skycloak Cluster Events API
The Cluster Events API from Skycloak — 2 operation(s) for cluster events.
The Cluster Events API from Skycloak — 2 operation(s) for cluster events.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/skycloak-io:skycloak-io-cluster-events-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Skycloak Public Cluster Events API
version: '2026-03-01'
contact:
name: Skycloak Support
url: https://support.skycloak.io
license:
name: Proprietary
description: Programmatic management of Keycloak infrastructure on the Skycloak platform.
servers:
- url: http://localhost:8000
description: Local development
variables: {}
tags:
- name: Cluster Events
paths:
/clusters/{cluster_id}/events:
get:
operationId: listClusterEvents
summary: List cluster events
description: '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`'
parameters:
- name: cluster_id
in: path
required: true
schema:
$ref: '#/components/schemas/ClusterId'
- name: limit
in: query
required: false
description: Maximum number of results to return.
schema:
allOf:
- $ref: '#/components/schemas/PageLimit'
default: 20
explode: false
- name: offset
in: query
required: false
description: Number of results to skip from the start.
schema:
allOf:
- $ref: '#/components/schemas/PageOffset'
default: 0
explode: false
- name: start_time
in: query
required: false
description: Inclusive start time (ISO 8601). Defaults to 24 hours ago when omitted.
schema:
type: string
format: date-time
- name: end_time
in: query
required: false
description: Inclusive end time (ISO 8601). Defaults to the current time when omitted.
schema:
type: string
format: date-time
- name: category
in: query
required: false
description: Filter to a specific event category. Returns both categories when omitted.
schema:
$ref: '#/components/schemas/EventCategory'
explode: false
- name: realm
in: query
required: false
description: Filter by realm name.
schema:
$ref: '#/components/schemas/RealmName'
explode: false
- name: realm_id
in: query
required: false
description: Filter by realm UUID.
schema:
type: string
format: uuid
explode: false
- name: client_ids
in: query
required: false
description: Filter by one or more OAuth2 client IDs. Accepts multiple values.
schema:
type: array
items:
type: string
x-oapi-codegen-extra-tags:
validate: omitnil,max=500
- name: user_id
in: query
required: false
description: Filter by Keycloak user UUID. Applies to user events only.
schema:
type: string
format: uuid
explode: false
- name: username
in: query
required: false
description: Filter by username prefix (case-sensitive). Applies to user events only.
schema:
type: string
minLength: 1
maxLength: 255
explode: false
- name: types
in: query
required: false
description: Filter by user event type. Accepts multiple values. Applies to user events only. Mutually exclusive with `operation_types`.
schema:
type: array
items:
$ref: '#/components/schemas/UserEventType'
x-oapi-codegen-extra-tags:
validate: omitnil,excluded_if=category,admin
x-oapi-codegen-extra-tags:
validate: omitnil,excluded_if=category,admin
- name: operation_types
in: query
required: false
description: Filter by admin operation type. Accepts multiple values. Applies to admin events only. Mutually exclusive with `types`.
schema:
type: array
items:
$ref: '#/components/schemas/AdminOperationType'
x-oapi-codegen-extra-tags:
validate: omitnil,excluded_if=category,user
x-oapi-codegen-extra-tags:
validate: omitnil,excluded_if=category,user
- name: error
in: query
required: false
description: Filter by error code. Applies to user events only.
schema:
type: string
minLength: 1
maxLength: 255
explode: false
- name: search
in: query
required: false
description: Case-insensitive substring search across `username`, `client_id`, `realm_name`, and `ip_address`.
schema:
type: string
minLength: 1
maxLength: 256
explode: false
- name: order
in: query
required: false
description: Sort order by `timestamp`. Defaults to `desc` (newest first).
schema:
allOf:
- $ref: '#/components/schemas/SortOrder'
default: desc
explode: false
- $ref: '#/components/parameters/CommonParameters'
responses:
'200':
description: The request has succeeded.
headers:
Total-Count:
required: true
description: Total number of results across all pages, before pagination is applied.
schema:
type: integer
Link:
required: false
description: RFC 8288 Link header containing `next`, `prev`, `first`, and `last` relations.
schema:
type: string
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Event'
'400':
description: The server could not understand the request due to invalid syntax.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'401':
description: Access is unauthorized.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'403':
description: Access is forbidden.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'404':
description: The server cannot find the requested resource.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'422':
description: Client error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ValidationErrorBody'
'429':
description: Client error
headers:
Retry-After:
required: false
schema:
type: integer
RateLimit-Limit:
required: false
schema:
type: integer
RateLimit-Remaining:
required: false
schema:
type: integer
RateLimit-Reset:
required: false
schema:
type: integer
X-RateLimit-Limit-Second:
required: false
schema:
type: integer
X-RateLimit-Remaining-Second:
required: false
schema:
type: integer
X-RateLimit-Limit-Minute:
required: false
schema:
type: integer
X-RateLimit-Remaining-Minute:
required: false
schema:
type: integer
X-RateLimit-Limit-Hour:
required: false
schema:
type: integer
X-RateLimit-Remaining-Hour:
required: false
schema:
type: integer
X-RateLimit-Limit-Day:
required: false
schema:
type: integer
X-RateLimit-Remaining-Day:
required: false
schema:
type: integer
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'500':
description: Server error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'501':
description: Server error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
tags:
- Cluster Events
security:
- ApiKeyAuth: []
x-scopes:
- clusters:events:read
/clusters/{cluster_id}/events/export:
get:
operationId: exportClusterEvents
summary: Export cluster events
description: 'Exports matching events as a CSV file. Returns `422` if the query matches more than 10,000 events
or the date range exceeds 90 days — narrow the filters or date range and retry.
Required scope: `clusters:events:read`'
parameters:
- name: cluster_id
in: path
required: true
schema:
$ref: '#/components/schemas/ClusterId'
- name: category
in: query
required: true
description: Filter by event category.
schema:
$ref: '#/components/schemas/EventCategory'
explode: false
- name: start_time
in: query
required: false
description: Inclusive start time (ISO 8601).
schema:
type: string
format: date-time
- name: end_time
in: query
required: false
description: Inclusive end time (ISO 8601).
schema:
type: string
format: date-time
- name: realm
in: query
required: false
description: Filter by realm name.
schema:
$ref: '#/components/schemas/RealmName'
explode: false
- name: realm_id
in: query
required: false
description: Filter by realm UUID.
schema:
type: string
format: uuid
explode: false
- name: client_ids
in: query
required: false
description: Filter by one or more OAuth2 client IDs.
schema:
type: array
items:
type: string
x-oapi-codegen-extra-tags:
validate: omitnil,max=500
- name: user_id
in: query
required: false
description: Filter by Keycloak user UUID.
schema:
type: string
format: uuid
explode: false
- name: username
in: query
required: false
description: Filter by username prefix.
schema:
type: string
minLength: 1
maxLength: 255
explode: false
- name: types
in: query
required: false
description: Filter by event type. Accepts multiple values. Mutually exclusive with `operation_types`.
schema:
type: array
items:
$ref: '#/components/schemas/UserEventType'
x-oapi-codegen-extra-tags:
validate: omitnil,excluded_if=category,user
x-oapi-codegen-extra-tags:
validate: omitnil,excluded_if=category,user
- name: operation_types
in: query
required: false
description: Filter by admin operation type. Accepts multiple values. Mutually exclusive with `types`.
schema:
type: array
items:
$ref: '#/components/schemas/AdminOperationType'
x-oapi-codegen-extra-tags:
validate: omitnil,excluded_if=category,admin
x-oapi-codegen-extra-tags:
validate: omitnil,excluded_if=category,admin
- name: error
in: query
required: false
description: Filter by error code.
schema:
type: string
minLength: 1
maxLength: 255
explode: false
- name: search
in: query
required: false
description: Substring search across `username`, `client_id`, `realm_name`, and `ip_address`.
schema:
type: string
minLength: 1
maxLength: 256
explode: false
- name: order
in: query
required: false
description: Sort order by `timestamp`. Defaults to `desc` (newest first).
schema:
allOf:
- $ref: '#/components/schemas/SortOrder'
default: desc
explode: false
- $ref: '#/components/parameters/CommonParameters'
responses:
'200':
description: The request has succeeded.
headers:
Content-Disposition:
required: true
description: Suggested filename for the downloaded file, e.g. `attachment; filename="events.csv"`.
schema:
type: string
content:
text/csv:
schema:
type: string
format: binary
'400':
description: The server could not understand the request due to invalid syntax.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'401':
description: Access is unauthorized.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'403':
description: Access is forbidden.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'404':
description: The server cannot find the requested resource.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'422':
description: Client error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ValidationErrorBody'
'429':
description: Client error
headers:
Retry-After:
required: false
schema:
type: integer
RateLimit-Limit:
required: false
schema:
type: integer
RateLimit-Remaining:
required: false
schema:
type: integer
RateLimit-Reset:
required: false
schema:
type: integer
X-RateLimit-Limit-Second:
required: false
schema:
type: integer
X-RateLimit-Remaining-Second:
required: false
schema:
type: integer
X-RateLimit-Limit-Minute:
required: false
schema:
type: integer
X-RateLimit-Remaining-Minute:
required: false
schema:
type: integer
X-RateLimit-Limit-Hour:
required: false
schema:
type: integer
X-RateLimit-Remaining-Hour:
required: false
schema:
type: integer
X-RateLimit-Limit-Day:
required: false
schema:
type: integer
X-RateLimit-Remaining-Day:
required: false
schema:
type: integer
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'500':
description: Server error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'501':
description: Server error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
tags:
- Cluster Events
security:
- ApiKeyAuth: []
x-scopes:
- clusters:events:read
components:
schemas:
ErrorBody:
type: object
required:
- type
- title
- status
- detail
properties:
type:
type: string
format: uri
title:
type: string
status:
type: integer
detail:
type: string
instance:
type: string
format: uri
description: RFC 9457 Problem Details object.
ValidationErrorBody:
type: object
required:
- type
- title
- status
- detail
- errors
properties:
type:
type: string
format: uri
title:
type: string
status:
type: integer
detail:
type: string
instance:
type: string
format: uri
errors:
type: array
items:
$ref: '#/components/schemas/FieldError'
minItems: 1
EventGeoLocation:
type: object
required:
- country_code
- country
- city
- latitude
- longitude
properties:
country_code:
type: string
description: ISO 3166-1 alpha-2 country code.
example: US
country:
type: string
city:
type: string
latitude:
type: number
format: double
longitude:
type: number
format: double
description: GeoIP location derived from the source IP address. Present only when GeoIP data is available.
example:
country_code: US
country: United States
city: New York
latitude: 40.7128
longitude: -74.006
UserEventType:
type: string
enum:
- LOGIN
- LOGIN_ERROR
- LOGOUT
- REGISTER
- REGISTER_ERROR
- CODE_TO_TOKEN
- CODE_TO_TOKEN_ERROR
- REFRESH_TOKEN
- INTROSPECT_TOKEN
- CLIENT_LOGIN
- CLIENT_LOGIN_ERROR
- UPDATE_PROFILE
- UPDATE_EMAIL
- UPDATE_PASSWORD
- UPDATE_TOTP
- REMOVE_TOTP
- VERIFY_EMAIL
- SEND_RESET_PASSWORD
- RESET_PASSWORD
- FEDERATED_IDENTITY_LINK
- REMOVE_FEDERATED_IDENTITY
- IDENTITY_PROVIDER_LOGIN
- IDENTITY_PROVIDER_FIRST_LOGIN
FieldError:
type: object
required:
- field
- detail
properties:
field:
type: string
detail:
type: string
code:
type: string
value: {}
AdminOperationType:
type: string
enum:
- CREATE
- UPDATE
- DELETE
- ACTION
EventCategory:
type: string
enum:
- user
- admin
description: Keycloak event category.
SortOrder:
type: string
enum:
- asc
- desc
description: Sort direction.
ClusterId:
type: string
format: uuid
PageOffset:
type: integer
minimum: 0
Versions:
type: string
enum:
- 2026-06-01.beta
PageLimit:
type: integer
minimum: 1
maximum: 100
Event:
type: object
required:
- id
- timestamp
- category
- realm_id
- realm_name
properties:
id:
type: string
format: uuid
timestamp:
type: string
format: date-time
category:
$ref: '#/components/schemas/EventCategory'
realm_id:
type: string
realm_name:
type: string
client_id:
type: string
description: OAuth2 client ID.
ip_address:
type: string
description: Source IP address of the request.
geo:
allOf:
- $ref: '#/components/schemas/EventGeoLocation'
description: GeoIP data resolved from `ip_address`.
type:
allOf:
- $ref: '#/components/schemas/UserEventType'
description: User event type code. Present when `category` is `user`.
example: LOGIN
user_id:
type: string
format: uuid
description: Keycloak user UUID. Present when `category` is `user`.
username:
type: string
description: '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.'
session_id:
type: string
description: OAuth2 session identifier. Present when `category` is `user`.
auth_method:
type: string
description: Authentication method. Present when `category` is `user`.
example: openid-connect
identity_provider:
type: string
description: Federated identity provider alias, when an external login was used. Present when `category` is `user`.
grant_type:
type: string
description: OAuth2 grant type. Present when `category` is `user`.
example: authorization_code
is_m2m:
type: boolean
description: Whether this was a machine-to-machine (client credentials grant) authentication. Present when `category` is `user`.
error:
type: string
description: Error code for failed events (e.g. `invalid_user_credentials`). Present when `category` is `user` and the event represents a failure.
example: invalid_user_credentials
operation_type:
allOf:
- $ref: '#/components/schemas/AdminOperationType'
description: Admin operation type (e.g. `CREATE`, `UPDATE`, `DELETE`). Present when `category` is `admin`.
example: CREATE
resource_type:
type: string
description: Type of resource affected (e.g. `USER`, `REALM`, `CLIENT`, `GROUP`). Present when `category` is `admin`.
example: USER
resource_path:
type: string
description: Full resource path. Present when `category` is `admin`.
example: /users/550e8400-e29b-41d4-a716-446655440000
auth_user_id:
type: string
format: uuid
description: '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.'
description: 'A Keycloak event recorded for a cluster. Fields present depend on `category`: user-event fields are absent for admin events and vice versa.'
RealmName:
type: string
minLength: 1
maxLength: 63
pattern: ^[a-zA-Z][a-zA-Z0-9-]*$
description: Keycloak realm name (not ID). Must start with a letter; allows letters, digits, and hyphens.
example: customer-portal
parameters:
CommonParameters:
name: API-Version
in: header
required: true
schema:
$ref: '#/components/schemas/Versions'
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: API-Key