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
Path Parameters | Required | Type | Description |
---|---|---|---|
| Yes | string | The UUID of the Kafka cluster where the topic will be created.
Example: |
Body Parameters | Required | Type | Description |
---|---|---|---|
| No | object | Optional metadata for the topic. |
| Yes | object | Properties of the topic to be created. |
| Yes | string | The name of the Kafka topic. |
| No | number | The number of replicas for the topic. This determines the fault tolerance. |
| No | number | The number of partitions for the topic. This affects the parallelism and throughput. |
| No | object | Configuration for log retention policies. |
| No | number | The retention time for logs in milliseconds. Defaults to 604800000 (7 days). |
| 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