tencent cloud



Last updated: 2022-11-18 17:12:10

1. API Description

Domain name for API request: tdmq.tencentcloudapi.com.

This API is used to enumerate all CMQ topics.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: DescribeCmqTopics.
Version Yes String Common Params. The value used for this API: 2020-02-17.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
Offset No Integer Starting position of a queue list to be returned on the current page in case of paginated return. If a value is entered, limit must be specified. If this parameter is left empty, 0 will be used by default.
Limit No Integer The number of queues to be returned per page in case of paginated return. If this parameter is not passed in, 20 will be used by default. Maximum value: 50.
TopicName No String Fuzzy search by TopicName
TopicNameList.N No Array of String Filter by CMQ topic name.
IsTagFilter No Boolean For filtering by tag, this parameter must be set to true.
Filters.N No Array of Filter Filter. Currently, you can filter by tag. The tag name must be prefixed with “tag:”, such as “tag: owner”, “tag: environment”, or “tag: business”.

3. Output Parameters

Parameter Name Type Description
TopicList Array of CmqTopic Topic list.
Note: This field may return null, indicating that no valid values can be obtained.
TotalCount Integer The total number of topics.
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Enumerating topics (without distinguishing between users)

Input Example

Host: tdmq.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeCmqTopics
<Common request parameters>

    "Limit": 1,
    "Offset": "0"

Output Example

    "Response": {
        "TotalCount": 360,
        "TopicList": [
                "Tags": [],
                "TopicId": "topic-catv1v6h",
                "TopicName": "QTA-6d1dfa44-5c70-11ea-8575-460d8830b47a",
                "CreateUin": 100002742997,
                "MsgRetentionSeconds": 86400,
                "MaxMsgSize": 65536,
                "Qps": 5000,
                "FilterType": 1,
                "CreateTime": 1583144853,
                "LastModifyTime": 1583144874,
                "MsgCount": 0
                "Tags": [],
                "TopicId": "topic-caysfz7j",
                "TopicName": "QTA-8f9162e2-5c6f-11ea-8dea-460d8830b47a",
                "CreateUin": 100002742997,
                "MsgRetentionSeconds": 86400,
                "MaxMsgSize": 1025,
                "Qps": 5000,
                "FilterType": 1,
                "CreateTime": 1583144481,
                "LastModifyTime": 1583144484,
                "MsgCount": 0
        "RequestId": "104f0831-f81a-4d65-81e4-ff0c6217ae23"

5. Developer Resources


TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation Operation failed.
FailedOperation.CmqBackendError CMQ backend error.
Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support