Get recent logs that match the given query for the specified hook with pagination. See GET /api/logs for details on the enableCap parameter and capped-response headers.
Query parameters
-
The log key to filter logs.
-
When
true, short-circuits the underlyingcount(*)query: results with more than 10,000 matching logs saturateTotal-Numberat the sentinel10001and emitTotal-Number-Is-Capped: true; theLinkheader omitsrel="last"andrel="next". Defaultfalse. (This endpoint is already scoped to a single hook over the last 24 hours, so the cap rarely triggers in practice.) -
Exclusive lower bound on
createdAt, in unix milliseconds. Supplying eitherstart_timeorend_timereplaces the endpoint's default 24-hour lower bound, so callers can query an arbitrary historical window. Returns400ifstart_time >= end_timewhen both are present. -
Exclusive upper bound on
createdAt, in unix milliseconds. Supplying eitherstart_timeorend_timereplaces the endpoint's default 24-hour lower bound. -
Page number (starts from 1).
Minimum value is
1. Default value is1. -
Entries per page.
Minimum value is
1. Default value is20.
curl \
--request GET 'https://[tenant_id].logto.app/api/hooks/{id}/recent-logs' \
--header "Authorization: Bearer $ACCESS_TOKEN"
# Headers
Total-Number: 42
Total-Number-Is-Capped: true
Link: string
# Payload
[
{
"id": "string",
"key": "string",
"payload": {
"key": "string",
"result": "Success",
"error": {},
"ip": "string",
"userAgent": "string",
"userAgentParsed": {
"ua": "string",
"browser": {
"name": "string",
"version": "string",
"major": "string",
"type": "string"
},
"device": {
"model": "string",
"type": "string",
"vendor": "string"
},
"engine": {
"name": "string",
"version": "string"
},
"os": {
"name": "string",
"version": "string"
},
"cpu": {
"architecture": "string"
}
},
"userId": "string",
"applicationId": "string",
"sessionId": "string",
"params": {}
},
"createdAt": 42.0
}
]