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

Torch Log Service

Copy page
Download PDF
Shard management API
DescribeShards
Copy page
Download PDF
DescribeShards
Call the DescribeShards interface to obtain a list of shards in a topic.​
Usage notes​
The call frequency limit for this interface is 20 times/s, and exceeding the frequency limit will result in an ExceedQPSLimit error.​
Request syntax​
  • Request Method:GET​
  • Request URL:https://{tls-endpoint}/DescribeShards​
Request parameters​
The table below only lists the request parameters specific to this interface and some common parameters. For more information, please see Common parameters.​
Query​
​
Name​
Type​
Required​
Example​
Description​
TopicId​
String​
True​
4a9bd4bd-53f1-43ff-b88a-64ee1be5****​
The ID of the topic.​
PageNumber​
Integer​
False​
1​
The page number when paging the query. The default is 1, that is, the return starts from the first page of data.​
PageSize​
Integer​
False​
10​
The page size. The default is 20, with a maximum of 100.​
​
Responses​
The table below only lists the return parameters specific to this interface. For more information, please refer to the Response message.​
​
Name​
Type​
Example​
Description​
Total​
Integer​
9​
The total number of Shards.​
Shards​
Array of QueryResp​
/​
The topic information.​
​
QueryResp​
​
Name​
Type​
Example​
Description​
Status​
String​
readwrite​
The status of the shard.​
  • readwrite: Read and write.​
  • readonly: Read-only.​
ShardId​
Integer​
0​
The ID of the shard.​
TopicId​
String​
4a9bd4bd-53f1-43ff-b88a-64ee1be5****​
The ID of the topic.​
ModifyTime​
String​
2021-05-24 16:19:46​
The modification time of the shard.​
StopWriteTime​
String​
2021-05-24 16:19:46​
The time when the shard stops writing, that is, the time of the last log written to this shard.​
ExclusiveEndKey​
String​
7fffffffffffffffffffffffffffffff​
The end key value of the shard.​
InclusiveBeginKey​
String​
00000000000000000000000000000000​
The starting key value of the shard.​
​
Sample Request​
​
GET https://{tls-endpoint}/DescribeShards?TopicId=1e***** HTTP/1.1​
​
Sample Response​
​
HTTP/1.1 200 OK​
Content-Type: application/json; charset=utf-8​
{​
"Total": 2,​
"Shards": [​
{​
"TopicId": "b62********",​
"ShardId": 0,​
"InclusiveBeginKey": "00000000000000000000000000000000",​
"ExclusiveEndKey": "7fffffffffffffffffffffffffffffff",​
"Status": "readwrite",​
"ModifyTime": "2021-08-12 16:56:18",​
"StopWriteTime": "2021-08-12 16:56:18"​
},​
{​
"TopicId": "b6*********",​
"ShardId": 1,​
"InclusiveBeginKey": "7fffffffffffffffffffffffffffffff",​
"ExclusiveEndKey": "ffffffffffffffffffffffffffffffff",​
"Status": "readwrite",​
"ModifyTime": "2021-08-12 16:56:19",​
"StopWriteTime": "2021-08-12 16:56:18"​
}​
]​
}​
​
Error code​
The following table lists the error codes related to the interface and business logic. For common error codes, please refer to the Common error codes.​
​
HTTP status code​
Error code​
Error message​
Description​
400​
InvalidArgument​
Invalid argument key %s, value %s, please check argument.​
The parameter is invalid.​
404​
TopicNotExist​
Topic does not exist.​
The 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