tencent cloud

DescribeDatahubTopics
Last updated: 2025-11-21 20:32:47
DescribeDatahubTopics
Last updated: 2025-11-21 20:32:47

1. API Description

Domain name for API request: ckafka.intl.tencentcloudapi.com.

This API is used to query the DataHub topic list.

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: DescribeDatahubTopics.
Version Yes String Common Params. The value used for this API: 2019-08-19.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
SearchWord No String Search term.
Offset No Integer Query offset, which defaults to 0.
Limit No Integer Maximum number of results to be returned in this request. Default value: 50. Maximum value: 50.
QueryFromConnectResource No Boolean Specifies whether to query the topic list from the connection.
ConnectResourceId No String Connection ID.
TopicRegularExpression No String topic resource expression.

3. Output Parameters

Parameter Name Type Description
Result DescribeDatahubTopicsResp Topic list.
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.

4. Example

Example1 Querying Datahub Topic List

Input Example

POST / HTTP/1.1
Host: ckafka.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeDatahubTopics
<Common request parameters>

{}

Output Example

{
    "Response": {
        "RequestId": "136d14bc-109d-4b1a-8b2c-de58cd04536d",
        "Result": {
            "TopicList": [
                {
                    "Name": "1300957330-devin-topic-test",
                    "Note": "",
                    "PartitionNum": 1,
                    "RetentionMs": 86400000,
                    "Status": 1,
                    "TopicId": "topic-elo4dm34",
                    "TopicName": "1300957330-devin-topic-test"
                },
                {
                    "Name": "1300957330-rxtest",
                    "Note": "",
                    "PartitionNum": 1,
                    "RetentionMs": 86400000,
                    "Status": 1,
                    "TopicId": "topic-2kcw8efy",
                    "TopicName": "1300957330-rxtest"
                },
                {
                    "Name": "1300957330-tanxing-qiang-2nd",
                    "Note": "",
                    "PartitionNum": 1,
                    "RetentionMs": 86400000,
                    "Status": 1,
                    "TopicId": "topic-g1ntq6se",
                    "TopicName": "1300957330-tanxing-qiang-2nd"
                },
                {
                    "Name": "1300957330-test",
                    "Note": "",
                    "PartitionNum": 1,
                    "RetentionMs": 86400000,
                    "Status": 1,
                    "TopicId": "topic-4621aeam",
                    "TopicName": "1300957330-test"
                },
                {
                    "Name": "1300957330-test-1",
                    "Note": "",
                    "PartitionNum": 1,
                    "RetentionMs": 86400000,
                    "Status": 1,
                    "TopicId": "topic-houq8qfw",
                    "TopicName": "1300957330-test-1"
                },
                {
                    "Name": "1300957330-test-topic2",
                    "Note": "",
                    "PartitionNum": 2,
                    "RetentionMs": 86400000,
                    "Status": 1,
                    "TopicId": "topic-ar3abkmu",
                    "TopicName": "1300957330-test-topic2"
                },
                {
                    "Name": "1300957330-testttt",
                    "Note": "",
                    "PartitionNum": 1,
                    "RetentionMs": 86400000,
                    "Status": 1,
                    "TopicId": "topic-gdbt9w28",
                    "TopicName": "1300957330-testttt"
                },
                {
                    "Name": "1300957330-topic1",
                    "Note": "",
                    "PartitionNum": 1,
                    "RetentionMs": 86400000,
                    "Status": 1,
                    "TopicId": "topic-ehzi5lue",
                    "TopicName": "1300957330-topic1"
                }
            ],
            "TotalCount": 8
        }
    }
}

5. Developer Resources

SDK

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

There is no error code related to the API business logic. For other error codes, please see Common Error Codes.

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback