Skip to main content

Kafka Management API

REST interface for managing Apache Kafka — topic operations, message browsing, consumer group management, and cluster health.

FieldValue
Port50034
Base Path/api/v1/kafka
OpenAPI3.0.1
SpecKafka_Management.json

Topics

MethodPathDescriptionQuery Params
GET/api/v1/kafka/topicsList all topicsincludeInternal (bool, default false)
POST/api/v1/kafka/topicsCreate topic
GET/api/v1/kafka/topics/{topicName}Get topic details (partitions, config)
DELETE/api/v1/kafka/topics/{topicName}Delete topic and all data
GET/api/v1/kafka/topics/{topicName}/messagesBrowse messagespartition, offset, limit, keyFilter, valueFilter
POST/api/v1/kafka/topics/{topicName}/truncateTruncate topic

CreateTopicRequest

{
"name": "string (required)",
"numPartitions": 1,
"replicationFactor": 1,
"configs": {
"retention.ms": "604800000"
}
}

TopicDetailResponse

{
"name": "my-topic",
"partitions": [
{
"partition": 0,
"leader": 1,
"replicas": [1],
"isr": [1],
"beginningOffset": 0,
"endOffset": 1234
}
],
"configs": { "retention.ms": "604800000" }
}

Consumer Groups

MethodPathDescription
GET/api/v1/kafka/groupsList consumer groups
GET/api/v1/kafka/groups/{groupId}Get group details
POST/api/v1/kafka/groups/{groupId}/reset-offsetsReset offsets (group must be empty)

ResetOffsetsRequest

{
"topic": "string (required)",
"strategy": "EARLIEST | LATEST | TO_OFFSET | BY_DURATION",
"offset": 0,
"duration": "PT1H"
}
warning

Offset reset requires the consumer group to have no active members. Returns 400 if members are connected.


Health & Cluster

MethodPathDescription
GET/api/v1/kafka/healthKafka health check
GET/api/v1/kafka/clusterCluster information

Status Codes

CodeMeaning
200Success
201Topic created
400Invalid request / group has active members
404Topic or group not found
409Topic already exists

Frontend Integration

FilePurpose
services/kafkaApi.tsTopic & consumer group operations
hooks/useKafkaTopics.tsReact Query hook