百度智能云

All Product Document

          Log Service

          Get Log Shipper

          Description

          View the specified logshipper details

          Request

          • Request syntax
          GET /v1/logshipper/{logShipperID} HTTP/1.1
          Host: bls-log.{region}.baidubce.com
          Authorization: authorization string
          • Request headers

          No additional headers are required beyond the standard request headers.

          • Request parameters
          Parameter name Types Required or not Parameter location Description
          logShipperID string yes path Task ID

          Response

          • Response headers

          No additional headers are required beyond the standard response headers.

          • Response parameters
          Parameter name Types Can it be empty Description
          status string no Running status, options: Running, Normal or Paused
          logShipperName string no Logshipper name
          project string no Project name
          logStoreName string no Logstore name
          startTime string no Specify logshipper start time
          destType string no Destination location type
          destConfig DestConfig no Target configuration details

          DestConfig structure:

          Parameter name Types Description
          BOSPath string BOSPath consists of a bucket plus a user-defined path
          partitionFormatTS string Disk partition format, for example%Y/%m/%d/%H/%M/
          partitionFormatLogStream bool Whether to use logstream as a partition level; default: false
          maxObjectSize int64 Maximum object size, unit: MB
          compressType string Compression type, optional parameters: snappy/gzip/bzip2/lzop and none
          deliverInterval int Delivery interval, in minute, limit range: integers between 5 and 60
          storageFormat string Storage format, optional parameters: parquet, json, csv
          csvHeadline bool Whether to deliver the field name in case of CSV
          csvDelimiter string Separator in case of CSV, options: comma (,), space ( ), pipe (|), or tab (\t)
          csvQuote string Quote character in case of CSV, options: single quote ('), double quote ("), none, or custom
          nullIdentifier string In case of CSV, when column is empty, fill specified content
          selectedColumnName string In case of CSV and parquet, the selected column name, the column name parameters separated by comma
          selectedColumnType string In case of parquet, the selected column type, the column type parameters separated by comma

          Error code

          Apart from standard error codes, the following codes may be returned:

          Error code Error message Description HTTP status code
          LogStoreNotFound LogStore [logStoreName] not exists Logstore not exist 404

          Note: [logStoreName] in error message may be replaced with a specific name.

          Example

          • Request example
          GET /v1/logshipper/2323-2333 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
          Content-Type: application/json; charset=utf-8
          • Response example
          HTTP/1.1 200
          Content-Type: application/json; charset=utf-8
          {
              "status":"Running",
              "logShipperName":"shipper1",
              "project":"default",
              "logStoreName":"logstore1",
              "startTime":"2021-01-12T01:01:00Z",
              "destType":"BOS",
              "destConfig":{
                  "BOSPath":"bucket1/path/",
                  "partitionFormatTS":"%Y/%m/%d/%H/%M/",
                  "partitionFormatLogStream":true,
                  "maxObjectSize":50,
                  "compressType":"snappy",
                  "deliverInterval":30,
                  "storageFormat":"csv",
                  "csvHeadline":false,
                  "csvSeparator":",",
                  "csvQuote":"\"",
                  "selectedColumnName":"v1,v2",
                  "selectedColumnType":"string,int32",
                  "nullIdentifier":"null"
              }
          }
          Previous
          Set Single Log Shipper Status
          Next
          Bulk Delete Log Shipper