Batch Deleting Topics of a Kafka Instance
Function
This API is used to delete multiple topics of a Kafka instance in batches. If some topics are deleted successfully while some fail to be deleted, a success response is returned with information about topics that fail to be deleted.
Calling Method
For details, see Calling APIs.
URI
POST /v2/{project_id}/instances/{instance_id}/topics/delete
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition: Project ID. For details, see Obtaining a Project ID. Constraints: N/A Range: N/A Default Value: N/A |
| instance_id | Yes | String | Definition: Instance ID. You can call the API for querying all instances to obtain the instance ID. The instance ID is in the response body. Constraints: N/A Range: N/A Default Value: N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| topics | No | Array of strings | Definition: Topics to delete. Constraints: N/A |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| topics | Array of topics objects | Definition: Topic list. |
Example Requests
Batch deleting topics
POST https://{endpoint}/v2/{project_id}/instances/{instance_id}/topics/delete
{
"topics" : [ "topic01" ]
} Example Responses
Status code: 200
The deletion is successful.
{
"topics" : [ {
"id" : "topic01",
"success" : true
} ]
} Status Codes
| Status Code | Description |
|---|---|
| 200 | The deletion is successful. |
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.