Skip to main content

System - Kafka Events List

Endpoint

/o/system/kafka/events

Overview

Returns paginated Kafka consumer event log rows with optional filtering and sorting.

Authentication

  • API Key (parameter): api_key=YOUR_API_KEY
  • Auth Token (parameter): auth_token=YOUR_AUTH_TOKEN
  • Auth Token (header): countly-token: YOUR_AUTH_TOKEN

Permissions

  • Requires authenticated dashboard user access to management-read endpoints.

Request Parameters

ParameterTypeRequiredDescription
api_keyStringYes (or use auth_token)Dashboard API key.
auth_tokenStringYes (or use api_key)Dashboard auth token.
eventTypeStringNoFilter by event type. Use all or omit for no filter.
groupIdStringNoFilter by consumer group. Use all or omit for no filter.
topicStringNoFilter by topic. Use all or omit for no filter.
clusterIdStringNoFilter by cluster id. Use all or omit for no filter.
iSortCol_0NumberNoSort column index: 0 _id, 1 ts, 2 type, 3 groupId, 4 topic, 5 partition, 6 clusterId.
sSortDir_0StringNoSort direction: asc or desc.
iDisplayStartNumberNoPagination offset, defaults to 0 when invalid.
iDisplayLengthNumberNoPage size. Allowed range: 1..1000. Invalid values default to 50.
sEchoStringNoEcho token returned unchanged in response.

Response

Success Response

{
"sEcho": "1",
"iTotalRecords": 502,
"iTotalDisplayRecords": 31,
"aaData": [
{
"_id": "67b2f76f9bb0d5f2f4a13e1a",
"ts": 1739790000000,
"type": "consume",
"groupId": "countly-events",
"topic": "events",
"partition": 2,
"clusterId": "cluster-a"
}
]
}

Response Fields

FieldTypeDescription
sEchoStringEcho value from request (if provided).
iTotalRecordsNumberTotal records in kafka_consumer_events without filters.
iTotalDisplayRecordsNumberTotal records matching active filters.
aaDataArrayPaginated event rows after filtering/sorting.
aaData[].typeStringEvent type (consume, error, etc.).
aaData[].groupIdStringConsumer group id.
aaData[].topicStringTopic name.
aaData[].partitionNumberKafka partition number.
aaData[].clusterIdStringKafka cluster id.

Error Responses

Status Code: 500 Internal Server Error

{
"result": "Error fetching Kafka consumer events"
}

Behavior/Processing

Behavior Modes

ModeTriggerResponse Shape
Filtered pageAny filter params provided (eventType, groupId, topic, clusterId)Paginated table response with filtered totals.
Unfiltered pageNo filters or filters set to allPaginated table response with global totals.
Query failureMongo query failsWrapped error message.

Database Collections

CollectionUsed forData touched by this endpoint
countly.kafka_consumer_eventsSource for event log rows and counts.Reads counts and paginated records.

Examples

Example 1: First page, default sort

/o/system/kafka/events?api_key=YOUR_API_KEY&iDisplayStart=0&iDisplayLength=50&sEcho=1

Example 2: Filter by group and topic

/o/system/kafka/events?api_key=YOUR_API_KEY&groupId=countly-events&topic=events&iDisplayStart=0&iDisplayLength=25&sEcho=2
{
"sEcho": "2",
"iTotalRecords": 502,
"iTotalDisplayRecords": 12,
"aaData": [
{
"type": "consume",
"groupId": "countly-events",
"topic": "events"
}
]
}

Operational Considerations

  • Requesting iDisplayLength above 1000 is clamped to default 50.
  • Invalid sort column indexes fall back to sort by ts descending.

Last Updated

2026-02-17