Updated on 2022-08-12 GMT+08:00

Deleting Topics in a Kafka Instance in Batches

Function

This API is used to delete topics in a Kafka instance in batches.

URI

POST /v1.0/{project_id}/instances/{instance_id}/topics/delete

Table 1 describes the parameter.

Table 1 Parameters

Parameter

Type

Mandatory

Description

project_id

String

Yes

Project ID.

instance_id

String

Yes

Instance ID.

Request

Request parameters

Table 2 describes the parameter.

Table 2 Request parameter

Parameter

Type

Mandatory

Description

topics

Array

Yes

List of topics to delete.

Example request

 {
  "topics" : ["hah", "aabb"]
 }

Response

Response parameters

Table 3 describes the parameter.

Table 3 Response parameters

Parameter

Type

Description

topics

Array

List of topics.

Table 4 topics parameter description

Parameter

Type

Description

id

String

Topic name.

success

Boolean

Whether the topic is deleted.

Example response

{
  "topics" : [{
      "id" : "haha",
      "success" : true
    }, {
      "id" : "aabb",
      "success" : true
    }
  ]
}

Status Code

Table 5 describes the status code of successful operations. For details about other status codes, see Status Code.

Table 5 Status code

Status Code

Description

200

The topics are successfully deleted.