Domain name for API request: tdmq.intl.tencentcloudapi.com.
This API is used to get the list of topics under an environment.
A maximum of 20 requests can be initiated per second for this API.
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: DescribeTopics. |
| 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. This API only supports: ap-bangkok, ap-beijing, ap-chengdu, ap-chongqing, ap-guangzhou, ap-hongkong, ap-jakarta, ap-nanjing, ap-seoul, ap-shanghai, ap-shanghai-fsi, ap-shenzhen-fsi, ap-singapore, ap-tokyo, eu-frankfurt, na-ashburn, na-siliconvalley. |
| EnvironmentId | Yes | String | Environment (namespace) name. |
| ClusterId | Yes | String | Pulsar cluster ID. |
| TopicName | No | String | Fuzzy match by topic name. |
| Offset | No | Integer | Offset, which defaults to 0 if left empty. |
| Limit | No | Integer | The number of results to be returned, which defaults to 10 if left empty. The maximum value is 20. |
| TopicType | No | Integer | Topic type description: 0: Non-persistent and non-partitioned topic; 1: Non-persistent and partitioned topic; 2: Persistent and non-partitioned topic; 3: Persistent and partitioned topic. |
| Filters.N | No | Array of Filter | * TopicName Query by topic name for exact search. Type: String Required: No |
| TopicCreator | No | Integer | Topic creator: 1: User 2: System |
| Parameter Name | Type | Description |
|---|---|---|
| TopicSets | Array of Topic | Array of topic sets. |
| TotalCount | Integer | The number of topics. |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
Obtains the list of topics in the environment
POST / HTTP/1.1
Host: tdmq.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeTopics
<Common request parameters>
{
"EnvironmentId": "devNs",
"TopicName": "devTopic",
"Offset": 1,
"Limit": 1,
"TopicType": 1,
"ClusterId": "pulsar-uahenidn",
"TopicCreator": 1
}{
"Response": {
"TotalCount": 1,
"RequestId": "bee03397-31dd-4688-8fe0-81c691c3c1ae",
"TopicSets": [
{
"PulsarTopicType": 0,
"TopicType": 1,
"ProducerCount": "1",
"ConsumerLimit": "1000",
"ConsumerCount": "200",
"LastLedgerCreatedTimestamp": "14578964532",
"MsgThroughputIn": "24",
"UpdateTime": "2020-09-22 00:00:00",
"AverageMsgSize": "20",
"Partitions": 1,
"Remark": "devRemark",
"LastConfirmedEntry": "23",
"TotalSize": "1",
"NumberOfEntries": "12",
"MsgRateOut": "10",
"ProducerLimit": "10",
"EnvironmentId": "devNs",
"TopicName": "devTopic",
"MsgRateIn": "12",
"MsgThroughputOut": "100",
"SubTopicSets": [
{
"TopicType": 1,
"ProducerCount": "1",
"LastConfirmedEntry": "100",
"TotalSize": "1",
"NumberOfEntries": "100",
"ConsumerCount": "1",
"MsgRateOut": "100",
"AverageMsgSize": "1",
"MsgThroughputIn": "100",
"MsgRateIn": "100",
"Partitions": 0,
"LastLedgerCreatedTimestamp": "124567885324",
"MsgThroughputOut": "100"
}
],
"CreateTime": "2020-09-22 00:00:00"
}
]
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| AuthFailure.UnauthorizedOperation | CAM authentication failed. |
| FailedOperation | Operation failed. |
| InternalError.SystemError | System error. |
| InvalidParameter.InvalidAdminUrl | Invalid management API address |
| InvalidParameterValue.InvalidParams | The parameter value is out of the value range. |
| MissingParameter.NeedMoreParams | A required parameter is missing. |
| ResourceNotFound.BrokerCluster | The service cluster does not exist. |
| ResourceNotFound.Cluster | The cluster does not exist. |
| ResourceNotFound.Environment | The environment does not exist. |
Feedback