Skip to content

REST reference ​

The UI is backed by a small REST API mounted under /api. The base URL is:

http://localhost:8000/api

All request and response bodies are JSON. Field names are camelCase. Kafka failures return 502, storage failures 500, and every error body is { "message": "..." }.

Endpoints ​

MethodPathDescription
GET/api/healthHealth check (plain-text healthy).
GET/api/cluster/overviewCluster statistics.
GET/api/topicsList topics.
POST/api/topicsCreate a topic.
GET/api/topics/{topicName}Topic detail, health and configs.
GET/api/topics/{topicName}/messages?limit=10Read messages.
POST/api/topics/{topicName}/messagesPublish a message.
GET/api/saved-messagesList saved message templates.
POST/api/saved-messagesSave a message template.
DELETE/api/saved-messages/{id}Delete a saved message (responds 204).

Health ​

GET /api/health

Returns the plain text healthy.

bash
curl http://localhost:8000/api/health

Cluster overview ​

GET /api/cluster/overview
json
{
  "bootstrapServers": "localhost:9092",
  "totalTopics": 12,
  "totalPartitions": 34,
  "preferredPartitionLeaderPercentage": 100.0,
  "totalUnderReplicatedPartitions": 0
}

List topics ​

GET /api/topics
json
{
  "topics": [
    {
      "topic": "orders",
      "partitions": 3,
      "preferredLeaderPercent": 100,
      "underReplicated": 0,
      "customConfigs": 1,
      "configs": [
        { "name": "cleanup.policy", "value": "compact", "readOnly": false }
      ]
    }
  ]
}

Create a topic ​

POST /api/topics
Content-Type: application/json
FieldTypeDescription
namestringTopic name.
numPartitionsintNumber of partitions.
replicationFactorintReplication factor.
bash
curl -X POST http://localhost:8000/api/topics \
  -H "Content-Type: application/json" \
  -d '{"name": "orders", "numPartitions": 3, "replicationFactor": 1}'
json
{ "name": "orders", "status": "created" }

Topic detail ​

GET /api/topics/{topicName}

Returns a single TopicSummary (the same shape as an item of the topics list).

Read messages ​

GET /api/topics/{topicName}/messages?limit=10

Reads from the earliest offset across all partitions. limit defaults to 10 and is capped at 100.

json
{
  "topic": "orders",
  "messages": [
    { "key": "order-42", "payload": "{\"item\":\"espresso\"}", "partition": 0, "offset": 7 }
  ]
}

key is null for keyless messages.

Publish a message ​

POST /api/topics/{topicName}/messages
Content-Type: application/json
FieldTypeDescription
keystringMessage key; empty for no key.
payloadstringMessage payload (opaque string).
bash
curl -X POST http://localhost:8000/api/topics/orders/messages \
  -H "Content-Type: application/json" \
  -d '{"key": "order-42", "payload": "{\"item\":\"espresso\",\"qty\":1}"}'
json
{ "topic": "orders", "status": "published" }

Saved messages ​

Reusable publish templates, stored server-side in SQLite.

List ​

GET /api/saved-messages
json
{
  "messages": [
    {
      "id": 1,
      "label": null,
      "topic": "orders",
      "key": "order-42",
      "payload": "{\"item\":\"espresso\"}",
      "createdAt": "2026-01-01 12:00:00"
    }
  ]
}

Save ​

POST /api/saved-messages
Content-Type: application/json
FieldTypeDescription
labelstring | nullOptional label.
topicstringTopic the template targets.
keystringMessage key.
payloadstringMessage payload.
bash
curl -X POST http://localhost:8000/api/saved-messages \
  -H "Content-Type: application/json" \
  -d '{"label": "espresso order", "topic": "orders", "key": "order-42", "payload": "{\"item\":\"espresso\"}"}'

Returns the created SavedMessage (with its generated id and createdAt).

Delete ​

DELETE /api/saved-messages/{id}

Responds 204 No Content on success.

Released under the MIT License.