Skip to content
SoulFire LogoSoulFire

Get log history

POST
/v1/logs:history

Retrieves historical log entries from the server's in-memory log buffer. The server maintains a rolling buffer of the last 300 log entries. Only returns non-personal logs that match the specified scope.

Authorization

headerAuthorizationBearer <JWT>

Preferred API authentication. Use a JWT with the api audience.

Request Body

application/json
  1. body

Request to retrieve historical log entries from the server's log buffer.

scope*

The scope defining which logs to retrieve. Personal logs are not included in historical retrieval as they are not stored.

count*integer

The maximum number of recent log entries to retrieve. Must not exceed 300 (the server's maximum log buffer size). Returns the newest entries that match the scope, up to this count.

Formatint32

Response Body

Response containing historical log entries.

application/json
  1. response

Response containing historical log entries.

messages*array<>

The list of log entries matching the requested scope, ordered from oldest to newest. May contain fewer entries than requested if not enough matching logs exist in the buffer.

Example Request
curl -X POST 'http://127.0.0.1:38765/v1/logs:history' \
  -H 'Content-Type: application/json' \
  -d '{
  "count": 0
}'
Example Response
{
  "messages": [
    {
      "id": "string",
      "message": "string",
      "instanceId": "string",
      "botAccountId": "string",
      "scriptId": "string",
      "personal": true,
      "instanceName": "string",
      "botAccountName": "string",
      "timestamp": "2019-08-24T14:15:22Z",
      "loggerName": "string",
      "level": "string"
    }
  ]
}

Was this page helpful?