You need to enable JavaScript to run this app.
Torch Log Service

Torch Log Service

Copy page
Download PDF
Topic management API
DescribeTopics
Copy page
Download PDF
DescribeTopics
Call the DescribeTopics API to obtain all topic information for a log project.​
Usage​
This API is used to view the list of topics under the specified log project. Supports pagination, offset-based queries, and fuzzy search by topic name and ID.​
The request rate limit for this API is 20 times per second. If exceeded, an ExceedQPSLimit error will occur.​
Request instructions​
  • Request method: GET​
  • Request URL: https://{tls-endpoint}/DescribeTopics​
Request parameters​
The following table lists only the request parameters specific to this API and some common parameters. For more information, see Common Parameters.​
Query​
​
Parameter​
Type​
Required​
Example value​
Description​
PageNumber​
Integer​
No​
1​
Page number for paginated queries. The default value is 1, which returns data starting from the first page.​
PageSize​
Integer​
No​
10​
Page size. The default is 20; the maximum is 100.​
TopicName​
String​
No​
test​
Log topic name; supports fuzzy matching.​
TopicId​
String​
No​
77​
Log topic ID. Fuzzy match supported.​
ProjectId​
String​
No​
6622a14b-770f-4171-a385-3b68486f****​
Project ID. Fuzzy match supported.​
ProjectName​
String​
No​
test-tls​
Project name, supports fuzzy matching​
Tags​
String​
No​
[{\"key\":\"key2\",\"Value\":\"value1\"}]​
Filter by log topic tags. For supported filtering methods, see Filter resources by tags.​
​
Return parameters​
The following table lists only the return parameters specific to this API. For more information, see Return Structure.​
​
Parameter​
Type​
Example value​
Description​
Total​
Integer​
2​
Number of log topics.​
Topics​
Array of DescribeResp​
/​
Log topic list.​
​
DescribeResp​
​
Parameter​
Type​
Example value​
Description​
Ttl​
Integer​
3650​
The total retention period of logs in TLS. When the log storage period exceeds the specified duration, expired logs in this topic are automatically deleted. The unit is days, and the default value is 30 days. The value ranges from 1 to 3650. If set to 3650 days, logs are stored permanently.​
tip​
When EnableHotTtl is set to true, the Ttl duration must be equal to the sum of HotTtl, ColdTtl, and ArchiveTtl.​
Tags​
Array of Tag​
[{"Key":"key1","Value":"value1"}]​
Log project label information.​
​
Tags identify and classify cloud resources. You can categorize projects and topics by tags to facilitate resource search and aggregation. For more details, see Tag Management.​
HotTtl​
Integer​
30​
Standard storage duration. The default duration is 30 days, and the value ranges from 7 to 3650.​
This parameter only takes effect when EnableHotTtl is set to true.​
TopicId​
String​
faf6d529-e75e-457f-a23a-9c4203a6dff3​
Log topic ID.​
AutoSplit​
Boolean​
true​
Automatic sharding can be enabled or disabled.​
​
After enabling, if the data volume exceeds the existing shard capacity for 5 consecutive minutes, TLS will automatically split the shards based on data volume to meet business needs. However, the total number of shards after splitting cannot exceed the maximum allowed split count. New shards created within the last 15 minutes will not split automatically.​
  • true: enabled.​
  • false: disabled.​
ProjectId​
String​
f**********​
The log topic's project ID​
TopicName​
String​
test-project​
Log topic name.​
CreateTime​
String​
2021-08-19 11:41:29​
Log topic creation time.​
ModifyTime​
String​
2021-08-19 11:41:32​
Log topic modification time.​
ShardCount​
Integer​
2​
Number of log topic shards.​
Description​
String​
This is a test topic​
Description of the log topic.​
LogPublicIP​
Boolean​
false​
Is the public IP address logging feature enabled?​
  • true: Enabled.​
  • false: Disabled.​
EnableHotTtl​
Boolean​
true​
Enable tiered storage. After enabling this feature, TLS supports standard storage, infrequent access storage, and archive storage.​
When HotTtl, ArchiveTtl, and ColdTtl are set, data is automatically transitioned to infrequent access or archive storage for continued retention once its storage duration exceeds the specified time. Data remains until the total retention period set by Ttl is reached, after which backend services automatically delete it.​
tip​
The Ttl duration must equal the sum of HotTtl, ColdTtl, and ArchiveTtl.​
MaxSplitShard​
Integer​
50​
Maximum number of shard splits, i.e., the maximum number of shards after splitting.​
EnableTracking​
Boolean​
false​
WebTracking can be enabled or disabled. If enabled, you can quickly collect frontend tracking data through it.​
  • true: Enabled​
  • false: Disabled​
ColdTtl​
Integer​
30​
Duration of infrequent access storage. The valid range is 1–3650.​
Infrequent access storage is available for standard storage periods of 7 days or longer.​
This parameter takes effect only when EnableHotTtl is set to true.​
ArchiveTtl​
Integer​
60​
Archive storage duration. The duration range is 60 to 3650.​
Archive storage can be enabled when any of the following conditions are met.​
  • Standard storage duration is 30 days or longer.​
  • Standard storage duration is 7 days or longer and infrequent access storage duration is 30 days or longer.​
This parameter is only effective when EnableHotTtl is set to true​
​
Tag​
​
Parameter​
Type​
Example value​
Description​
Key​
String​
owner​
Value of the tag key For configuration rules, refer to Tag setting rules​
Value​
String​
zhangsan​
Value of the tag. For configuration guidelines, refer to the Tag Configuration Rules.​
​
Sample request​
​
GET https://{tls-endpoint}/DescribeTopics?ProjectId=662***&PageNumber=1&PageSize=10&TopicName=tes&IsFullName=false&Tags=[{"Key":"key1","Value":"value1"}] HTTP/1.1​
​
Sample response​
​
HTTP/1.1 200 OK​
Content-Type: application/json; charset=utf-8​
...​
{​
"Total": 2,​
"Topics": [​
{​
"TopicName": "test****",​
"ProjectId": "c7e0****",​
"ProjectName": "test****",​
"TopicId": "b80f****",​
"Ttl": 1023,​
"CreateTime": "2023-12-19 11:41:29",​
"ModifyTime": "2023-12-19 11:41:32",​
"ShardCount": 2,​
"Description": "test that this is a test s",​
"AutoSplit":true,​
"MaxSplitShard":50,​
"EnableTracking":false,​
"LogPublicIP": false,​
"Tags":[​
{​
"Key":"key1",​
"Value":"value1"​
}​
]​
},​
{​
"TopicName": "test17-2",​
"ProjectId": "c7e0*********",​
"ProjectName": "test****",​
"TopicId": "bcb2*********",​
"Ttl": 1023,​
"CreateTime": "2021-08-19 10:43:13",​
"ModifyTime": "2021-08-19 10:43:16",​
"ShardCount": 2,​
"Description": "test that this is a test s",​
"AutoSplit":true,​
"MaxSplitShard":50,​
"EnableTracking":false,​
"Tags":[​
{​
"Key":"key1",​
"Value":"value1"​
}​
]​
}​
]​
}​
​
Error Code​
The table below lists error codes related to this interface and business logic. For general error codes, see the General Error Codes documentation.​
​
HTTP status code​
Error Code​
Error message​
Description​
400​
InvalidArgument​
Invalid argument key %s, value %s, please check argument.​
Invalid parameter.​
404​
TopicNotExist​
topic %s does not exist.​
The log topic does not exist​
500​
InternalServerError​
We encountered an unexpected server error, please try again later.​
Internal server error.​
​
Last updated: 2025.10.28 18:41:13