All Products
Document Center


Last Updated: Oct 08, 2019



This API is used to modify topic attributes.


A request mainly includes the following parts:

  • Request line

    PUT /topics/$TopicName?metaoverride=true HTTP/1.1

  • Special URI parameters

    metaoverride=true: The attributes of the topic will be modified.

  • Special Request Header

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

  • Request Body

    The request body is in XML format and contains the configured topic attributes.

Parameter name Description Parameter value Required/Optional
MaximumMessageSize Maximum body length of a message sent to the topic, in the unit of bytes An integer in the range of 1,024 (1 KB) to 65,536 (64 KB) Optional
LoggingEnabled Whether to enable log management. “True” indicates that log management is enabled, whereas “False” indicates that log management is disabled. True/False Optional


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

  • HTTP Status Code

    HTTP/1.1 204 No Content

  • Special Response Header

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

  • Response Body


Special error

Error code Error message Status code
TopicNotExist The topic you provided does not exist. 404

Request example:

  1. PUT /topics/$TopicName?metaoverride=true HTTP/1.1
  2. Host: $
  3. x-mns-version: 2015-06-06
  4. Date: Tue, 08 Dec 2015 06:01:00 GMT
  5. Authorization:MNS 15B4D3461F177624206A:SeIRcZk3lKiP7bl19WB9Uz07bI8=
  6. <?xml version="1.0" encoding="utf-8"?>
  7. <Topic xmlns="">
  8. <MaximumMessageSize>65536</MaximumMessageSize>
  9. <LoggingEnabled>True</LoggingEnabled>
  10. </Topic>

Response example:

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