百度智能云

All Product Document

          Log Service

          Interface Specification

          Calling Mode

          API calls follow the HTTP/HTTPS protocol, and each region uses a different domain name, for example: The specific domain name of North China-Beijing is http(s)://bls-log.bj.baidubce.com. The data exchange format is JSON, and all request/response body contents are encoded in UTF-8.

          Authentication Mechanism

          All APIs complete the request signature to pass the server Authorization and Authentication pass AK (Access Key ID)/SK (Secret Access Key) to. For the detailed contents of authentication certification mechanism, please see Authentication Mechanism.

          Public Request Header

          The BLS API adopts the Restful style, and the public request header is applicable to all API requests. The specific definition is as follows:

          Header Type Description
          Authorization String Authentication information used to verify the validity of the request. For more, refer to Authorization and Authentication
          Host String Access the Host value, for example: bls-log.{region}.baidubce.com
          Content-Type String The HTTP request content type defined in RFC 2616, currently BLS API requests only support application/json
          Content-Length Int HTTP request content length defined in RFC 2616
          X-Bce-Date String String representing the date
          X-Bce-Request-Id String Request id of this request
          X-Bce-Security-Token String This item is required when using STS temporary identity to send data, otherwise don’t fill in it
          X-Region String Region requested

          As an example, the following is the content of the request header field of a standard user query log store details:

          GET /v1/logstore/demo HTTP/1.1 
          X-Bce-Date: 2019-09-04T13:04:26Z 
          Host: bls-log.bj.baidubce.com 
          Content-Type: application/json
          Authorization:bce-auth-v1/18717522d39411e9b721df098b0b908c/2019-09-10T07:00:20Z/1800/content-type;host;x-bce-date;x-bce-request-id/6a7cb6c9ac7ec156c805e55e7d0bcfc443b47feee97cf099c1c0d9 

          Public Response Header

          The BLS API adopts the Restful style, and the public response header is applicable to all API requests. The specific definition is as follows:

          Header Type Description
          Content-Type String The HTTP response content type defined in RFC 2616, currently BLS API requests only support application/json
          Content-Length Int HTTP request content length defined in RFC 2616
          x-Bce-Request-Id String The request ID returned by the server is used to track and locate the problem. The user can provide this ID when submitting a ticket
          Previous
          Service Domain Name
          Next
          General Error Code