Get logs

GET /api/logs

Get logs that match the given query with pagination.

Query parameters

  • userId string

    Filter logs by user ID.

  • applicationId string

    Filter logs by application ID.

  • logKey string

    Filter logs by log key.

  • page integer

    Page number (starts from 1).

    Minimum value is 1. Default value is 1.

  • page_size integer

    Entries per page.

    Minimum value is 1. Default value is 20.

Responses

  • 200 application/json

    An array of logs that match the given query.

    Hide response attributes Show response attributes object
    • tenantId string Required

      Maximum length is 21.

    • id string Required

      Minimum length is 1, maximum length is 21.

    • key string Required

      Minimum length is 1, maximum length is 128.

    • payload object Required
      Hide payload attributes Show payload attributes object
      • key string Required
      • result string Required

        Values are Success or Error.

      • error object | string

      • ip string
      • userAgent string
      • userId string
      • applicationId string
      • sessionId string
      • params object
    • createdAt number Required
  • 400

    Bad Request

  • 401

    Unauthorized

  • 403

    Forbidden

GET /api/logs
curl \
 --request GET 'https://[tenant_id].logto.app/api/logs' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
[
  {
    "tenantId": "string",
    "id": "string",
    "key": "string",
    "payload": {
      "key": "string",
      "result": "Success",
      "error": {},
      "ip": "string",
      "userAgent": "string",
      "userId": "string",
      "applicationId": "string",
      "sessionId": "string",
      "params": {}
    },
    "createdAt": 42.0
  }
]