Get recent logs for a hook

GET /api/hooks/{id}/recent-logs

Get recent logs that match the given query for the specified hook with pagination.

Path parameters

  • id string Required

    The unique identifier of the hook.

Query parameters

  • logKey string

    The log key to filter logs.

  • 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

    A list of recent logs for the hook.

    Hide response attributes Show response attributes object
    • 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/hooks/{id}/recent-logs
curl \
 --request GET 'https://[tenant_id].logto.app/api/hooks/{id}/recent-logs' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
[
  {
    "id": "string",
    "key": "string",
    "payload": {
      "key": "string",
      "result": "Success",
      "error": {},
      "ip": "string",
      "userAgent": "string",
      "userId": "string",
      "applicationId": "string",
      "sessionId": "string",
      "params": {}
    },
    "createdAt": 42.0
  }
]