Batch Get LogStore
Updated at:2025-11-03
Description
Obtain logstore details in bulk.
Request
- Request syntax
Text
1POST /v1/logstore/batch HTTP/1.1
2Host: <Endpoint>
3Authorization: <Authorization String>
4{
5 "LogStores": [
6 {
7 "project": "project-1",
8 "logStoreName": "log-1"
9 },
10 {
11 "project": "project-2",
12 "logStoreName": "log-2"
13 }
14 ]
15}
- Request headers
No additional headers are required beyond the standard request headers.
- Request parameters
| Parameter name | Types | Required or not | Parameter location | Description |
|---|---|---|---|---|
| LogStores | List<LogStoreBatchRequest> | Yes | Query | Logstores to query, at most 100 logstores each time |
LogStoreBatchRequest
| Parameter name | Types | Description |
|---|---|---|
| project | String | Project name |
| logStoreName | String | Logstore name |
Response
- Response headers
No additional headers are required beyond the standard response headers.
- Response parameters
| Parameter name | Types | Description |
|---|---|---|
| code | String | Status code |
| success | bool | Whether return success status |
| result | List<LogStore> | Logstore list |
The element structure of each logstore in the result array in the above table is as follows:
| Field name | Types | Description |
|---|---|---|
| creationDateTime | DateTime | Logstore creation datetime |
| lastModifiedTime | DateTime | Last modification datetime |
| project | String | Project name |
| logStoreName | String | Logstore name |
| retention | Int | Storage time |
| disableShardAutoSplit | Boolean | Whether to disable auto splitting |
| hotRetention | Int | Hot storage (standard storage) retention, unit: day |
| indexEnabled | Boolean | Whether to enable index |
| enableHotRetention | Boolean | Whether to enable storage tiering |
| maxShardCount | Int | Maximum number of shards |
| resourceID | String | Resource ID |
| shardCount | Int | Number of shards |
| shortID | String | Abbreviated logstore ID |
Error code
No special error codes are returned beyond standard error codes.
Example
- Request example
Text
1POST /v1/logstore/batch HTTP/1.1
2Host: bls-log.bj.baidubce.com
3Authorization:bce-auth-v1/18717522d39411e9b721df098b0b908c/2019-09-10T07:00:20Z/1800/content-type;host;x-bce-date;x-bce-request-id/6a7cb6c9ac7ec156c805e55e7d0bcfc443b47feee97cf099c1c0d93a0b4c8304
4{
5 "LogStores": [
6 {
7 "project": "default",
8 "logStoreName": "bls-test"
9 }
10 ]
11}
- Response example
Text
1HTTP/1.1 200 OK
2Content-Type: application/json; charset=utf-8
3
4{
5 "code": "OK",
6 "result": [
7 {
8 "resourceID": "l-oNFnO***",
9 "shortID": "l-oNFnO***",
10 "project": "default",
11 "logStoreName": "bls-test",
12 "retention": 30,
13 "shardCount": 1,
14 "maxShardCount": 50,
15 "disableShardAutoSplit": false,
16 "indexEnabled": true,
17 "creationDateTime": "2024-11-18T03:03:05Z",
18 "lastModifiedTime": "2024-11-22T03:10:55Z",
19 "hotRetention": 30,
20 "enableHotRetention": false
21 }
22 ],
23 "success": true
24}
