Updated on 2023-06-29 GMT+08:00

Deleting Topics

Function

This API is used to delete topics.

URI

DELETE /v2/{project_id}/mqs/instances/{instance_id}/topics

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Tenant's project ID.

instance_id

Yes

String

Instance ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

name

Yes

String

Topics to delete. Multiple topics are separated by commas (,).

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token, which can be obtained by calling the IAM API (value of X-Subject-Token in the response header).

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

topics

Array of topics objects

Topic list.

Table 5 topics

Parameter

Type

Description

id

String

Topic name.

success

Boolean

Whether the topics are deleted.

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 403

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Requests

DELETE https://{endpoint}/v2/{project_id}/mqs/instances/{instance_id}/topics?name=topic-mqs-test1,topic-mqs-test2

Example Responses

Status code: 200

OK

{
  "topics" : [ {
    "id" : "topic-mqs-test1",
    "success" : true
  }, {
    "id" : "topic-mqs-test2",
    "success" : true
  } ]
}

Status code: 400

Bad Request

{
  "error_code" : 400,
  "error_msg" : "Bad Request"
}

Status code: 403

Forbidden

{
  "error_code" : 403,
  "error_msg" : "Forbidden"
}

Status Codes

Status Code

Description

200

OK

400

Bad Request

403

Forbidden

Error Codes

See Error Codes.