All Products
Search
Document Center

Simple Log Service:PullLogs

最終更新日:Nov 13, 2024

Queries logs based on the specified cursors. You can call this operation to obtain raw logs. To query and analyze logs, you can call the GetLogsV2 operation.

Operation description

You cannot call this operation in OpenAPI Explorer. You can use Simple Log Service SDK to call this operation. For more information, see SLS SDK Reference.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request syntax

GET /logstores/{logstore}/shards/{shard} HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
querystringNo

The SPL statement that is used to filter data. For more information, see SPL instructions.

* | where userId='123'

Response parameters

ParameterTypeDescriptionExample
headersobject
Content-Lengthstring
0
Datestring
Sun, 27 May 2018 08:25:04 GMT
x-log-requestidstring
5B0A6B60BB6EE39764D458B5
x-log-countstring
5
x-log-cursorstring
MTQ0NzMyOTQwMTEwMjEzMDkwNA
x-log-cursor-timestring
x-log-end-of-cursorstring
Content-Typestring
application/json
x-log-compresstypestring
*
x-log-bodyrawsizestring
0
LogGroupList

Examples

Sample success responses

JSONformat

{
  "logGroupList": [
    {
      "Topic": "topic-test",
      "Source": "192.1.1.1",
      "LogTags": [
        {
          "Key": "key-test",
          "Value": "value-test"
        }
      ],
      "Logs": [
        {
          "Time": 1690254376,
          "Contents": [
            {
              "Key": "key-test",
              "Value": "value-test"
            }
          ]
        }
      ]
    }
  ]
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-09-06Add OperationView Change Details