Export cluster events
const url = 'http://localhost:8000/clusters/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/events/export?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/export?category=user&realm=customer-portal&order=desc' \
--header 'API-Key: <API-Key>' \
--header 'API-Version: 2026-06-01.beta'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
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Keycloak event category.
Filter by event category.
Inclusive start time (ISO 8601).
Inclusive end time (ISO 8601).
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.
Filter by Keycloak user UUID.
Filter by username prefix.
Filter by event type. Accepts multiple values. Mutually exclusive with operation_types.
Filter by admin operation type. Accepts multiple values. Mutually exclusive with types.
Filter by error code.
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.
Headers
Section titled “Headers”Suggested filename for the downloaded file, e.g. attachment; filename="events.csv".
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"
}