tencent cloud

APIs

DescribeTopics

下载
聚焦模式
字号
最后更新时间: 2026-06-10 15:00:21

1. API Description

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

This API is used to obtain logs or metric topic lists and supports pagination.

A maximum of 50 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: DescribeTopics.
Version Yes String Common Params. The value used for this API: 2020-10-16.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
Filters.N No Array of Filter
  • Filter topicName by [topic name]. The default is fuzzy matching. You can set the PreciseSearch parameter to exact match. Type: String. Required: No
  • logsetName filters by [logset name], defaults to fuzzy matching, and can be set to exact match using the PreciseSearch parameter. Type: String. Required: No
  • topicId filters by [topic ID]. Type: String. Required: No
  • logsetId filters by [logset ID]. You can call the DescribeLogsets API to query the list of created logsets or log in to the console to view. You can also call the CreateLogset API to create logset. Type: String. Required: No
  • tagKey Filter by [tag key]. Type: String. Required: No
  • tag:tagKey - filter by [tag key-value pair]. Replace tagKey with a specific tag key, such as tag:exampleKey. Type: String. Required: no
  • storageType filters by [storage type of the topic]. Value range: hot (standard storage), cold (infrequent storage). Type: String. Required: No

Note: Each request can have up to 10 Filters. The upper limit of Filter.Values is 100.
Offset No Integer Page offset. Default value: 0.
Limit No Integer Maximum number of entries per page. Default value: 20. Maximum value: 100.
PreciseSearch No Integer Control whether the related fields in Filters are exact matches.
  • 0: Default value. topicName and logsetName use fuzzy matching
  • 1: topicName Exact match
  • 2: Exact match by logsetName
  • 3: Exact match by both topicName and logsetName
BizType No Integer Topic type
-0: Log topic, default value
-Metric topic

3. Output Parameters

Parameter Name Type Description
Topics Array of TopicInfo Topic list
TotalCount Integer Total number
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 Obtaining the Log Topic List

Obtaining the Log Topic List

Input Example

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

{
    "Filters": [],
    "Offset": 0,
    "Limit": 1
}

Output Example

{
    "Response": {
        "RequestId": "9402a324-xxxx-xxxx-xxxx-2bc613cd187e",
        "Topics": [
            {
                "AssumerName": "",
                "AssumerUin": 0,
                "AutoSplit": true,
                "BizType": 0,
                "CreateTime": "2024-12-26 19:28:55",
                "Describes": "",
                "EffectiveDate": "",
                "Extends": {
                    "AnonymousAccess": null
                },
                "HotPeriod": 0,
                "Index": true,
                "IsWebTracking": false,
                "KeyId": "",
                "LogsetId": "fd0605ca-xxxx-xxxx-xxxx-592e5233c2db",
                "MaxSplitPartitions": 50,
                "MigrationStatus": 0,
                "PartitionCount": 1,
                "Period": 1,
                "RoleName": "",
                "Status": true,
                "StorageType": "hot",
                "SubAssumerName": "",
                "Tags": [],
                "TopicAsyncTaskID": "",
                "TopicId": "8a41c585-xxxx-xxxx-xxxx-c358a595f662",
                "TopicName": "topic-name-test"
            }
        ],
        "TotalCount": 1544
    }
}

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

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.TagQpsLimit The frequency of tag service requests is limited.
FailedOperation.Timeout Operation timed out
InternalError Internal error.
InvalidParameter Incorrect parameter.
InvalidParameterValue Incorrect parameter value.
MissingParameter Missing parameter.
OperationDenied Operation denied.
OperationDenied.ACLFailed ACL verification failed.
OperationDenied.AccountDestroy The account has been terminated.
OperationDenied.AccountIsolate The account has overdue payments.
OperationDenied.AccountNotExists The account does not exist.
OperationDenied.AnalysisSwitchClose The analysis feature is not enabled for the field.
ResourceNotFound.LogsetNotExist The specified logset does not exist.
ResourceNotFound.TopicNotExist The log topic does not exist.
UnsupportedOperation Unsupported operation.

帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈