Download OpenAPI specification:Download
KafkaPilot API for comprehensive Kafka cluster management and monitoring
KafkaPilot is an all-in-one, container-native tool that live-samples Kafka traffic, scores partition activity, exposes management APIs (including intelligent partition redistribution) and displays everything in a modern React dashboard.
{- "success": true,
- "data": {
- "brokers": [
- {
- "id": 0,
- "host": "string",
- "port": 0,
- "rack": "string",
- "available": true
}
], - "topics": [
- {
- "name": "string",
- "partitions": [
- {
- "id": 0,
- "leader": 0,
- "replicas": [
- 0
], - "isr": [
- 0
]
}
], - "isInternal": true
}
], - "maintenanceBrokers": {
- "property1": true,
- "property2": true
}
}
}
Returns comprehensive cluster information including sampling status and detailed partition data
{- "success": true,
- "data": {
- "brokers": [
- {
- "id": 0,
- "host": "string",
- "port": 0,
- "rack": "string",
- "available": true
}
], - "topics": [
- {
- "name": "string",
- "partitions": [
- {
- "id": 0,
- "leader": 0,
- "replicas": [
- 0
], - "isr": [
- 0
]
}
], - "isInternal": true
}
], - "brokerRacks": {
- "property1": "string",
- "property2": "string"
}, - "maintenanceBrokers": {
- "property1": true,
- "property2": true
}, - "sampling": {
- "totalPartitions": 0,
- "sampledPartitions": 0,
- "samplingCoverage": 0
}
}
}
Returns real-time partition activity data including sampling statistics and rates
{- "success": true,
- "data": {
- "partitionActivity": [
- {
- "topic": "string",
- "partition": 0,
- "leader": 0,
- "replicas": [
- 0
], - "isr": [
- 0
], - "messageCount": 0,
- "totalMessages": 0,
- "byteCount": 0,
- "totalSize": 0,
- "activityScore": 0,
- "messageRate": 0,
- "byteRate": 0,
- "samplingStatus": "sampled",
- "healthStatus": "healthy",
- "isInternal": true,
- "lastSampled": "2019-08-24T14:15:22Z",
- "lastUpdated": "2019-08-24T14:15:22Z",
- "hasSamples": true,
- "highWatermark": 0,
- "lowWatermark": 0
}
], - "sampledPartitions": 0,
- "activePartitions": 0,
- "totalMessages": 0,
- "totalBytes": 0,
- "messagesPerSec": 0,
- "bytesPerSec": 0,
- "clusterTotalPartitions": 0,
- "clusterTotalReplicaPartitions": 0,
- "clusterTotalTopics": 0,
- "samplingCoverage": 0,
- "lastSampleTime": "2019-08-24T14:15:22Z",
- "lastMetadataUpdate": "2019-08-24T14:15:22Z"
}
}
Redistributes all partitions of a topic using the specified strategy
topic required | string Name of the topic to redistribute |
strategy required | string Enum: "ROUND_ROBIN" "RANDOM" "BALANCED" "RACK_AWARE" Redistribution strategy to use |
excludedBrokers | Array of integers <int32> [ items <int32 > ] Broker IDs to exclude from redistribution |
{- "strategy": "BALANCED",
- "excludedBrokers": [
- 3,
- 4
]
}
{- "success": true,
- "message": "string",
- "reassignmentId": "string"
}
Redistributes a single partition to different brokers
topic required | string Name of the topic |
partition required | integer <int32> Partition number to redistribute |
targetBrokers required | Array of integers <int32> [ items <int32 > ] Target broker IDs for the partition |
{- "targetBrokers": [
- 1,
- 2,
- 3
]
}
{- "success": true,
- "message": "string",
- "reassignmentId": "string"
}
Reassigns multiple partitions in a single operation
topic required | string Name of the topic |
description | string Optional description for the bulk operation |
required | Array of objects (RedistributePartitionRequest) non-empty List of partition redistribution requests |
{- "description": "Rebalancing user-events topic for better distribution",
- "partitions": [
- {
- "partition": 0,
- "replicas": [
- 1,
- 2,
- 3
], - "preview": false
}, - {
- "partition": 1,
- "replicas": [
- 2,
- 3,
- 4
], - "preview": false
}
]
}
{- "success": true,
- "message": "string",
- "reassignmentId": "string"
}
Marks a broker for maintenance mode and redistributes its partitions to other brokers
brokerId required | integer <int32> ID of the broker to put in maintenance mode |
strategy required | string Enum: "ROUND_ROBIN" "RANDOM" "BALANCED" "RACK_AWARE" Redistribution strategy to use for evacuating partitions |
preserveLeaders | boolean Default: true Whether to preserve current leaders when possible |
preview | boolean Default: false If true, only return a preview of changes without executing them |
force | boolean Default: false Allow maintenance even if it causes under-replicated partitions |
{- "strategy": "RACK_AWARE",
- "preserveLeaders": true,
- "preview": false,
- "force": false
}
{- "success": true,
- "message": "string"
}
Updates the configuration for a specific topic
topic required | string Name of the topic |
required | object Configuration key-value pairs to update |
{- "configs": {
- "retention.ms": "604800000",
- "max.message.bytes": "1048576",
- "cleanup.policy": "delete"
}
}
{- "success": true,
- "message": "string"
}
Updates configurations for multiple topics in a single operation
required | Array of objects |
{- "topics": [
- {
- "name": "user-events",
- "configs": {
- "retention.ms": "604800000",
- "cleanup.policy": "delete"
}
}, - {
- "name": "product-updates",
- "configs": {
- "max.message.bytes": "2097152",
- "compression.type": "gzip"
}
}
]
}
{- "success": true,
- "data": {
- "successfulTopics": 0,
- "failedTopics": 0
}
}
Searches topics based on configuration criteria
required | Array of objects |
{- "criteria": [
- {
- "key": "retention.ms",
- "operator": "gt",
- "value": "86400000"
}, - {
- "key": "cleanup.policy",
- "operator": "in",
- "values": [
- "delete",
- "compact"
]
}
]
}
{- "success": true,
- "topics": [
- {
- "name": "string",
- "configs": {
- "property1": "string",
- "property2": "string"
}
}
], - "totalMatches": 0
}
Generates an activity-based redistribution proposal
strategy | string Enum: "activity_based" "balanced" "rack_aware" Proposal generation strategy |
targetBrokers | Array of integers <int32> [ items <int32 > ] Target brokers for proposal (optional - if not specified, all available brokers will be used) |
excludeMaintenanceBrokers | boolean Default: true Whether to exclude brokers in maintenance mode |
{- "strategy": "activity_based",
- "targetBrokers": [
- 1,
- 2,
- 3,
- 4
], - "excludeMaintenanceBrokers": true
}
{- "success": true,
- "proposalId": "proposal-2024-01-15-123456",
- "proposal": {
- "strategy": "activity_based",
- "movesCount": 12,
- "estimatedDurationSeconds": 300,
- "summary": "Redistribution will balance 12 high-activity partitions across 4 brokers"
}
}
Triggers preferred leader election for the entire cluster or specified topics
required | Array of objects List of topics and their partitions for preferred leader election |
{- "topics": [
- {
- "topic": "user-events",
- "partitions": [
- 0,
- 1,
- 2
]
}, - {
- "topic": "system-logs",
- "partitions": [ ]
}
]
}
{- "success": true,
- "message": "string"
}
Triggers preferred leader election for a specific topic
topic required | string Name of the topic |
required | Array of objects List of topics and their partitions for preferred leader election |
{- "topics": [
- {
- "topic": "user-events",
- "partitions": [
- 0,
- 1,
- 2
]
}, - {
- "topic": "system-logs",
- "partitions": [ ]
}
]
}
{- "success": true,
- "message": "string"
}
{- "success": true,
- "data": [
- {
- "id": "string",
- "status": "string",
- "topic": "string",
- "partition": 0,
- "fromReplicas": [
- 0
], - "toReplicas": [
- 0
], - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "progress": 0
}
]
}
{- "success": true,
- "data": [
- {
- "id": "string",
- "status": "string",
- "topic": "string",
- "partition": 0,
- "fromReplicas": [
- 0
], - "toReplicas": [
- 0
], - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "progress": 0
}
]
}
{- "success": true,
- "data": [
- {
- "id": "string",
- "status": "string",
- "topic": "string",
- "partition": 0,
- "fromReplicas": [
- 0
], - "toReplicas": [
- 0
], - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "progress": 0
}
]
}
Returns detailed status of a specific reassignment
id required | string ID of the reassignment |
{- "success": true,
- "data": {
- "id": "string",
- "status": "string",
- "topic": "string",
- "partition": 0,
- "fromReplicas": [
- 0
], - "toReplicas": [
- 0
], - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "progress": 0
}
}