Deleting Consumer Groups of a Kafka Instance in Batches
Function
This API is used to delete multiple consumer groups of a Kafka instance in batches.
Calling Method
For details, see Calling APIs.
URI
POST /v2/{project_id}/instances/{instance_id}/groups/batch-delete
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. For details about how to obtain it, see Obtaining a Project ID. |
|
instance_id |
Yes |
String |
Instance ID. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
group_ids |
Yes |
Array of strings |
IDs of all consumer groups to be deleted. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
failed_groups |
Array of failed_groups objects |
List of consumer groups that failed to be deleted. |
|
total |
Integer |
Number of records that fail to be deleted. |
Example Requests
Batch deleting consumer groups
POST https://{endpoint}/v2/{project_id}/instances/{instance_id}/groups/batch-delete
{
"group_ids" : [ "get-sync-group0", "get-sync-group1" ]
}
Example Responses
Status code: 200
The consumer groups are deleted successfully.
{
"failed_groups" : [ {
"group_id" : "test-1",
"error_message" : "UNKNOW"
}, {
"group_id" : "test-2",
"error_message" : "UNKNOW"
} ],
"total" : 2
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
The consumer groups are deleted successfully. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.