Create a Kafka Topic
Allows you to create a new Kafka topic within a specified Kafka cluster.
Endpoint
POST /clusters/{clusterId}/topics
The POST /clusters/{clusterId}/topics
endpoint creates a new Kafka topic within the specified Kafka cluster (clusterId
). The request body must include the name of the topic, the other parameters are optional.
Upon successful creation, the endpoint returns detailed information about the newly created topic, including its ID (id), metadata, and properties. Use this endpoint to dynamically manage Kafka topics within your environment, ensuring efficient data distribution and retention policies.
Use this endpoint to dynamically manage Kafka topics within your environment, ensuring efficient data distribution and retention policies.
Parameters
clusterId
Yes
string
The UUID of the Kafka cluster where the topic will be created.
Example: /clusters/e69b22a5-8fee-56b1-b6fb-4a07e4205ead/topics
metadata
No
object
Optional metadata for the topic.
properties
Yes
object
Properties of the topic to be created.
properties.name
Yes
string
The name of the Kafka topic.
properties.replicationFactor
No
number
The number of replicas for the topic. This determines the fault tolerance.
properties.numberOfPartitions
No
number
The number of partitions for the topic. This affects the parallelism and throughput.
properties.logRetention
No
object
Configuration for log retention policies.
properties.logRetention.retentionTime
No
number
The retention time for logs in milliseconds. Defaults to 604800000 (7 days).
properties.logRetention.segmentBytes
No
number
The maximum size of a log segment in bytes before a new segment is rolled. Defaults to 1073741824 (1 GB).
Request Body
Response
Last updated