# Kafka Administration

Condense offers a fully managed Kafka service, that automates the complexities of Kafka infrastructure management. This includes handling tasks such as cluster provisioning, scaling, and maintenance, allowing users to focus on building and deploying data pipelines. The platform provides built-in security features and real-time observability, enabling users to monitor and optimize their Kafka deployments effortlessly.

To manage Kafka-related configurations, Condense offers Kafka admin client APIs. The admin client APIs can be used for all the cluster operations, such as `createTopics`, `createPartitions`, etc.

## API Contract Along with a Detailed Description <a href="#api-contract-along-with-the-detailed-description" id="api-contract-along-with-the-detailed-description"></a>

<table><thead><tr><th width="132">API Name</th><th>API Request</th><th>API Description</th><th width="256">API Response</th></tr></thead><tbody><tr><td>/listGroups</td><td>NA</td><td>The purpose of the ListGroups API is to get a simple list of the Group IDs that are managed by broker.</td><td><p><code>{</code> <br><code>"data":</code> <br><code>{ "groups":</code> <br><code>[</code> </p><p><code>{ "groupId": "b8316KqF_M9OwFfFAABXhdfhbu", "protocolType": "consumer" },</code> <br><code>{ "groupId": "connect-cluster-sqs", "protocolType": "connect" },</code> <br><code>{ "groupId": "connect-aws-sqs-sink-connector", "protocolType": "consumer" }</code> <br><code>]</code> </p><p><code>},</code> <br><code>"status": "success", "message": "Groups retrieved successfully" }</code></p></td></tr><tr><td>/resetOffSets</td><td><code>{ "groupId": "my-consumer-group", "topic": "postmanValidation" }</code></td><td>Resets the consumer group offset to the earliest or latest offset. Note that consumer group must have no running instances when performing the reset</td><td><code>{ "status": "success", "message": "Offset Reset successfully" }</code></td></tr><tr><td>/setOffSets</td><td><code>{ "topic": "postmanValidation", "partitions":</code> <br><code>[</code> <br><code>{ "partition": 0, "offset": 0 }</code> <br><code>]</code> <br><code>}</code></td><td>Delete records for a selected topic. This will delete all records from the earliest offset. To delete all records in a partition, use a target offset of <code>-1</code>.</td><td>NA</td></tr><tr><td>/createTopic</td><td><code>{ "topicName": "postmanValidation", "timeoutTime":5000, "numOfPartitions": 2, "configEntries": []</code> <br><code>}</code></td><td>This API will create a new topic and will return true if created successfully or false when creating a new topic. <br><br>NOTE: If <em>configEnties and other configurations are not given, it’ll take the default configuration from the Broker.</em></td><td><code>{ "status": "success", "message": "Topic Created Successfully" }</code></td></tr><tr><td>/deleteTopic</td><td><code>{ "topicName":"postmanValidation" }</code></td><td>This will delete the topic from kafka cluster. Only one topic can be deleted at once.</td><td><code>{ "status": "success", "message": "Topic deleted successfully" }</code></td></tr><tr><td>/getAllTopicDetails</td><td>NA</td><td>API will fetch all the metadata related to all topics in kafka cluster</td><td><code>{ "name": "test", "partitions":</code> <br><code>[</code><br><code>{ "partitionErrorCode": 0, "partitionId": 0, "leader": 2, "replicas":</code> <br><code>[ 2, 1, 0 ],</code> <br><code>"isr": [ 2, 1, 0 ], "offlineReplicas": [] },</code> <br><code>{ "partitionErrorCode": 0, "partitionId": 3, "leader": 2, "replicas": [ 2, 0, 1 ],</code> <br><code>"isr": [ 2, 1, 0 ], "offlineReplicas": []</code><br><code>}</code> <br><code>]</code> <br><code>}</code></td></tr><tr><td>/getTopicDetails/:topic</td><td><code>{ "topic": "postmanValidation" }</code></td><td>This API shall fetch metadata along with latest offset of a single topic.</td><td><p><code>{ "data":</code> <br><code>{ "topics":</code> <br><code>[</code> <br><code>{ "name": "postmanValidation", "partitions":</code> <br><code>[</code> <br><code>{ "partitionErrorCode": 0, "partitionId": 0, "leader": 2, "replicas": [ 2, 1, 0 ],</code> <br><code>"isr": [ 2, 1, 0 ], "offlineReplicas": [] },</code> <br><code>{ "partitionErrorCode": 0, "partitionId": 1, "leader": 1, "replicas": [ 1, 0, 2 ],</code> <br><code>"isr": [ 1, 0, 2 ], "offlineReplicas": []</code><br><code>} ],</code></p><p><code>"offsetOfTopic":</code> <br><code>[</code> <br><code>{ "partition": 1, "offset": "0", "high": "0", "low": "0" },</code><br><code>{ "partition": 0, "offset": "0", "high": "0", "low": "0" }</code><br><code>]</code></p><p><code>}</code></p><p><code>]</code></p><p><code>}, "status": "success", "message": "Data retrieved successfully" }</code></p></td></tr><tr><td>/describeCluster</td><td>NA</td><td>API gets information about the broker cluster. This API details contains details related to monitoring</td><td><p><code>{ "data":</code> <br><code>{ "brokers":</code> <br><code>[</code> <br><code>{ "nodeId": 0, "host": "my-cluster-kafka-0.my-cluster-kafka-brokers.kafka.svc", "port": 9092 },</code> </p><p><code>{ "nodeId": 2, "host": "my-cluster-kafka-2.my-cluster-kafka-brokers.kafka.svc", "port": 9092 },</code></p><p><code>{ "nodeId": 1, "host": "my-cluster-kafka-1.my-cluster-kafka-brokers.kafka.svc", "port": 9092 }</code> </p><p><code>],</code> </p><p><code>"controller": 2, "clusterId": "YpxpUciGScack2Z9CijpGw" },</code> </p><p><code>"status": "success", "message": "Data retrieved successfully" }</code></p></td></tr><tr><td>/describeTopic</td><td><code>{ "topicName":"postmanValidation" }</code></td><td>Get the configuration for the specified topic in kafka cluster</td><td><p><code>{ "data":</code> </p><p><code>{ "resources":</code> </p><p><code>[</code> </p><p><code>{ "errorCode": 0, "errorMessage": "", "resourceType": 2, "resourceName": "postmanValidation", "configEntries":</code> </p><p><code>[</code> </p><p><code>{ "configName": "compression.type", "configValue": "producer", "readOnly": false, "isDefault": true, "configSource": 5, "isSensitive": false, "configSynonyms": []</code> </p><p><code>},</code> </p><p><code>]</code> </p><p><code>}</code> </p><p><code>]</code> </p><p><code>},</code> </p><p><code>"status": "success", "message": "Data retrieved successfully" }</code></p></td></tr><tr><td>/updateTopicConfigs</td><td><p><code>{ "topicName": "postmanValidation", "configEntries": [</code> </p><p><code>{ "name": "cleanup.policy", "value": "compact" }</code> </p><p><code>]</code> </p><p><code>}</code></p></td><td>Update the configuration for the specified topic</td><td><p><code>{ "data":</code> </p><p><code>{ "resources":</code> </p><p><code>[</code> </p><p><code>{ "errorCode": 0, "errorMessage": null, "resourceType": 2, "resourceName": "postmanValidation"</code> </p><p><code>}</code> </p><p><code>]</code> </p><p><code>},</code> </p><p><code>"status": "success", "message": "Configuration updated successfully" }</code></p></td></tr><tr><td>/getOffsetsForGroup</td><td><code>{ "groupId":"my-consumer-group" }</code></td><td>It returns the consumer group offset for a list of topics</td><td><code>{ "status": "success", "message": "Offsets retrieved successfully", "partitions": [] }</code></td></tr><tr><td>/deleteGroup</td><td><code>{ "groupId":"my-consumer-group" }</code></td><td>This API shall delete group by groupId. Only a single group can be deleted at once</td><td><code>{ "status": "success", "message": "Group Deleted successfully" }</code></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zeliot.in/condense/v2.4.0/overview/fully-managed-kafka/kafka-administration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
