百度智能云

All Product Document

          Log Service

          Batch Get LogStore

          Description

          Obtain logstore details in bulk.

          Request

          • Request syntax
          POST /v1/logstore/batch HTTP/1.1
          Host: <Endpoint>
          Authorization: <Authorization String>
          {
              "LogStores": [
                  {
                      "project": "project-1",
                      "logStoreName": "log-1"
                  },
                  {
                      "project": "project-2",
                      "logStoreName": "log-2"
                  }
              ]
          }
          • 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
          POST /v1/logstore/batch HTTP/1.1
          Host: bls-log.bj.baidubce.com
          Authorization:bce-auth-v1/18717522d39411e9b721df098b0b908c/2019-09-10T07:00:20Z/1800/content-type;host;x-bce-date;x-bce-request-id/6a7cb6c9ac7ec156c805e55e7d0bcfc443b47feee97cf099c1c0d93a0b4c8304
          {
              "LogStores": [
                  {
                      "project": "default",
                      "logStoreName": "bls-test"
                  }
              ]
          }
          • Response example
          HTTP/1.1 200 OK
          Content-Type: application/json; charset=utf-8
          
          {
              "code": "OK",
              "result": [
                  {
                      "resourceID": "l-oNFnO***",
                      "shortID": "l-oNFnO***",
                      "project": "default",
                      "logStoreName": "bls-test",
                      "retention": 30,
                      "shardCount": 1,
                      "maxShardCount": 50,
                      "disableShardAutoSplit": false,
                      "indexEnabled": true,
                      "creationDateTime": "2024-11-18T03:03:05Z",
                      "lastModifiedTime": "2024-11-22T03:10:55Z",
                      "hotRetention": 30,
                      "enableHotRetention": false
                  }
              ],
              "success": true
          }
          Previous
          Delete LogStore
          Next
          Describe LogStore