Topics

POST /admin/topics

Changed on

Creates a topic with given name, partitions count, and replication factor.

Request

  • The document declares no server URL.
  • Auth
    none declared

Request body

topic_namestring required

Name of the topic to create.

partitions_countinteger nullable

The number of partitions for the topic. If not specified, the broker default is used.

replication_factorinteger nullable

The number of replicas for each partition. If not specified, the broker default is used.

Example request

{
  "topic_name": "my-topic",
  "partitions_count": 3,
  "replication_factor": 2
}

Response

Created.

Changes