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

Torch Log Service

Copy page
Download PDF
Topic management API
DescribeTopic
Copy page
Download PDF
DescribeTopic
Call the DescribeTopic API to obtain basic topic information for logs​
Usage instructions​
This API has a rate limit of 20 requests per second. If exceeded, the ExceedQPSLimit error will occur​
Request instructions​
  • Request method: GET​
  • Request URL: https://{tls-endpoint}/DescribeTopic​
Request parameters​
The table below lists unique request parameters for this API and some common parameters For more information, see Public Parameters​
Query​
​
Parameter​
Type​
Required​
Example value​
Description​
TopicId​
String​
Yes​
c7e0e442-19bf-4fb3-b547-5992fb8b****​
Log topic ID​
​
Return parameter​
The table below lists only the return parameters specific to this API. For more information, see Return structure.​
​
Parameter​
Type​
Example value​
Description​
TopicName​
String​
test-project​
Log topic name​
ProjectId​
String​
f**********​
ID of the project to which the log topic belongs.​
TopicId​
String​
faf**********​
Log topic ID.​
Ttl​
Integer​
3650​
Total retention period of logs in TLS. Expired logs in this topic will be automatically deleted after the specified log storage period. Unit: days. The default is 30 days. The valid range is 1 to 3650. Setting the value to 3650 days means permanent storage.​
tip​
After you set EnableHotTtl to true, the Ttl period must match the total value of HotTtl, ColdTtl, and ArchiveTtl.​
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.​
AutoSplit​
Boolean​
true​
Automatic sharding can be enabled or disabled.​
  • true: Enabled​
  • false: Disabled​
MaxSplitShard​
Integer​
50​
Maximum number of shard splits.​
EnableTracking​
Boolean​
false​
Whether the WebTracking feature is enabled.​
  • true: Enabled​
  • false: Disabled​
Tags​
Array of Tag​
[{"Key":"key1", "Value":"value1"}]​
Log topic tag information.​
​
Tags identify and classify cloud resources. You can categorize log projects and topics by tags to facilitate resource search and aggregation. For details, see Tag Management.​
LogPublicIP​
Boolean​
false​
Indicates whether logging of external IP addresses is enabled.​
  • true: Enabled​
  • false: Disabled​
EnableHotTtl​
Boolean​
true​
Enable tiered storage. When enabled, TLS supports standard storage, infrequent access storage, and archive storage.​
After you set HotTtl, ArchiveTtl, and ColdTtl, if data is stored longer than the corresponding duration, it automatically shifts to infrequent access or archive storage for further retention until the total log retention period (Ttl) on the server is reached and is then cleaned up by backend services.​
tip​
  • Archive storage is an invitation-only feature. For related business needs, contact your account manager to enable allowlist access.​
  • The Ttl duration must equal the sum of HotTtl, ColdTtl, and ArchiveTtl values.​
HotTtl​
Integer​
7​
Standard storage duration. The default duration is 30 days, and can be set from 7 to 3650 days.​
This parameter is only effective when EnableHotTtl is set to true.​
ColdTtl​
Integer​
10​
Low-frequency storage duration The valid range for this duration is 1~3650​
Low-frequency storage is available when the standard storage period is seven days or longer​
This parameter only takes effect when EnableHotTtl is set to true​
ArchiveTtl​
Integer​
10​
Archive storage period. The valid range is 60–3650.​
Archive storage is enabled when any of the following conditions are met.​
  • Standard storage period is 30 days or longer.​
  • Standard storage period is 7 days or longer and infrequent access storage period is 30 days or longer.​
This parameter takes effect only when EnableHotTtl is set to true.​
​
Tag​
​
Parameter​
Type​
Example value​
Description​
Key​
String​
owner​
Tag key value. Refer to tag setting rules for configuration guidelines.​
Value​
String​
zhangsan​
Value of Tag value. For detailed tag configuration rules, refer to Tag setting rules.​
​
Sample request​
​
GET https://{tls-endpoint}/DescribeTopic?TopicId=fa******** HTTP/1.1​
​
Sample response​
​
HTTP/1.1 200 OK​
Content-Type: application/json; charset=utf-8​
{​
"TopicName": "test17-2",​
"ProjectId": "c7e***********",​
"TopicId": "bc***********",​
"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,​
"LogPublicIP": false,​
"Tags": [​
{​
"Key": "key1",​
"Value": "value1"​
}​
]​
}​
​
Error Code​
The table below lists the error codes related to the business logic of this API. For common error codes, see the Common Error Code documentation.​
​
HTTP status code​
Error Code​
Error message​
Note​
400​
InvalidArgument​
Invalid argument key %s, value %s, please check argument.​
Invalid parameter.​
404​
TopicNotExist​
topic %s does not exist.​
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