All Products
Search
Document Center

DeleteTopic

Last Updated: Oct 08, 2019

DeleteTopic

Description

This API is used to delete an existing topic.

NOTE:

  1. Be cautious when using this API. After a topic is deleted, all messages in the topic and subscriptions to the topic are also deleted and cannot be recovered.

Request

  1. A request includes the following parts:
  • Request line

    DELETE /topics/$TopicName HTTP/1.1

  • Special Request Header

    None. For details, refer to Call method/Public parameters.

  • Request Body

    None

Response

  1. The response message includes three parts: return status line, HTTP header, and message body.
  • HTTP Status Code

    HTTP/1.1 204 No Content

    If the topic to be deleted does not exist, Status Code 204 is returned and the Delete operation is successful.

  • Special response header

    None. For details, refer to Call method/Public parameters.

  • Response Body

    None

Request example:

  1. DELETE /topics/$TopicName HTTP/1.1
  2. Host: $AccountId.mns.cn-hangzhou.aliyuncs.com
  3. Date: Tue, 08 Dec 2015 06:05:08 GMT
  4. Authorization: MNS 15B4D3461F177624206A:xit63dyKs83PTJF0hx3fd04CWog=
  5. x-mns-version: 2015-06-06

Response example:

  1. HTTP/1.1 204 No Content
  2. x-mns-request-id: 56667314B2B71C9C16000021
  3. x-mns-version: 2015-06-06