Events API Reference
All event query APIs are available through the GraphQL endpoint at /events-query.
Operations use POST with a JSON body containing a query key.
Replace <your-instance> with your Kloudfuse hostname and <sa-token> with a valid Service Account token.
curl -H "Authorization: Bearer <sa-token>" \
-H "Content-Type: application/json" \
-X POST "https://<your-instance>/events-query" \
-d '{"query": "..."}'
For Service Account token setup, see Authentication. See graphql for general guidance on using the GraphQL client. Failed operations report errors in the standardized format described in API Response Codes.
For what an event’s fields mean, see The event model.
Filtering events
Most operations take an EventFilter, a boolean expression over eq, neq, startsWith, endsWith, contains, regex, nregex, and keyExists, combined with and, or, and not. Each comparison operator (except keyExists) takes a Selector — { name, value }.
name is either a top-level event field, prefixed with @ (for example, @severity, @source), or a bare label name (for example, kube_namespace) — see The event model for the field list and labelNames for the labels available in your environment.
{
"and": [
{ "eq": { "name": "@severity", "value": "error" } },
{ "eq": { "name": "@source", "value": "kubernetes" } }
]
}
events
Gets a list of events based on time, filters, and a specified limit.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
|
Time |
No |
Events start at this timestamp; defaults to |
|
int |
No |
Duration to look back, in seconds; defaults to 300. |
|
EventFilter |
No |
See Filtering events. |
|
int |
No |
Skip this many results — use for paging through large result sets. |
|
int |
No |
Maximum rows to return; defaults to 200. |
|
EventSortBy |
No |
|
|
SortOrder |
No |
|
Returns a list of Event objects — see The event model for field meanings. labels is only populated if requested in the response selection.
curl -H "Authorization: Bearer <sa-token>" \
-H "Content-Type: application/json" \
-X POST "https://<your-instance>/events-query" \
-d '{
"query": "{ events(durationSecs: 3600, limit: 5, filter: { and: [{ eq: { name: \"@severity\", value: \"error\" } }, { eq: { name: \"@source\", value: \"kubernetes\" } }] }) { id title severity source eventType timestamp } }"
}'
{
"data": {
"events": [
{
"id": "e702f735-a97f-4b48-8144-244c805076b4",
"title": "Events from the Pod default/checkout-7d6258b6-x0k2",
"severity": "error",
"source": "kubernetes",
"eventType": "kubernetes_apiserver",
"timestamp": "2026-09-15T20:09:05Z"
}
]
}
}
eventCounts
Gets the count of events, optionally grouped by rounded timestamp, and/or by a facet or label.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
|
Time |
No |
Events start at this timestamp; defaults to |
|
int |
No |
Duration to look back, in seconds; defaults to 300. |
|
EventFilter |
No |
See Filtering events. |
|
string |
No |
A facet ( |
|
[string] |
No |
Facets and/or labels to group by; defaults to no grouping. |
|
int |
No |
Bucket size, in seconds, to round the timestamp to. Omit to count over the full time range as a single bucket. |
|
TopOrBottomK |
No |
|
|
int |
No |
Maximum rows to return; defaults to the instance’s configured Pinot default limit. |
Returns a list of EventCount objects, each with timestamp, count, keys (the groupBys field names), and values (the corresponding group’s values).
curl -H "Authorization: Bearer <sa-token>" \
-H "Content-Type: application/json" \
-X POST "https://<your-instance>/events-query" \
-d '{
"query": "{ eventCounts(durationSecs: 3600, roundSecs: 300, groupBys: [\"@severity\"], filter: { eq: { name: \"@source\", value: \"kubernetes\" } }) { timestamp count keys values } }"
}'
{
"data": {
"eventCounts": [
{ "timestamp": "2026-09-15T20:05:00Z", "count": 812, "keys": ["@severity"], "values": ["info"] },
{ "timestamp": "2026-09-15T20:05:00Z", "count": 3, "keys": ["@severity"], "values": ["error"] }
]
}
}
facetValues
Gets the distinct values of a facet (a top-level event field, @-prefixed) with their counts, over the given time range.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
|
string |
Yes |
The facet to enumerate — for example, |
|
Time |
No |
Events start at this timestamp; defaults to |
|
int |
No |
Duration to look back, in seconds; defaults to 300. |
|
EventFilter |
No |
See Filtering events. |
|
int |
No |
Maximum values to return; defaults to the instance’s configured Pinot default limit. |
Returns a list of ValueCount objects (value, count).
curl -H "Authorization: Bearer <sa-token>" \
-H "Content-Type: application/json" \
-X POST "https://<your-instance>/events-query" \
-d '{"query": "{ facetValues(durationSecs: 3600, facetName: \"@source\") { value count } }"}'
{
"data": {
"facetValues": [
{ "value": "kubernetes", "count": 174656 },
{ "value": "kafka", "count": 240 },
{ "value": "helm", "count": 120 },
{ "value": "System", "count": 3 }
]
}
}
facetNames
Gets the list of available facet names. Takes no arguments and is not scoped to a time range.
curl -H "Authorization: Bearer <sa-token>" \
-H "Content-Type: application/json" \
-X POST "https://<your-instance>/events-query" \
-d '{"query": "{ facetNames }"}'
labelValues
Gets the distinct values of a label with their counts, over the given time range.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
|
string |
Yes |
The label to enumerate — for example, |
|
Time |
No |
Events start at this timestamp; defaults to |
|
int |
No |
Duration to look back, in seconds; defaults to 300. |
|
EventFilter |
No |
See Filtering events. |
|
int |
No |
Maximum values to return; defaults to the instance’s configured Pinot default limit. |
Returns a list of ValueCount objects (value, count).
labelNames
Gets the list of available label names for events in the specified time range.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
|
Time |
No |
Events start at this timestamp; defaults to |
|
int |
No |
Duration to look back, in seconds; defaults to 300. |
|
EventFilter |
No |
See Filtering events. |
curl -H "Authorization: Bearer <sa-token>" \
-H "Content-Type: application/json" \
-X POST "https://<your-instance>/events-query" \
-d '{"query": "{ labelNames(durationSecs: 3600, filter: { eq: { name: \"@source\", value: \"kubernetes\" } }) }"}'
{
"data": {
"labelNames": ["kube_cluster_name", "kube_namespace", "kube_name", "kube_kind", "orchestrator", "..."]
}
}
Error handling
GraphQL errors are returned with HTTP 200 in an errors array alongside a null data value — see Logs API error handling for the response shape and common causes.
See Also
-
Events Architecture — what an event is, and where events come from
-
Events Explorer — the UI built on this API
-
Folders API Reference — Service Account token setup