List API requests
Changed onList the requests that the Unkey API served for your workspace, newest first.
Filter by time, path, method, request ID, and status. In one field, values under is, contains, startsWith, and endsWith are combined with OR. Values under isNot and notContains, and the range operators gt, gte, lt, and lte, are combined with AND. Different fields are combined with AND. Every text match is exact and case-sensitive.
To get the next page, send the pagination.cursor of the previous page together with the same filters. A cursor does not expire, but rows older than the log retention leave the listing.
Unkey returns only requests inside the log retention of your workspace. The calls to this endpoint are not logged.
Required Permissions
Your root key must have the following permission:
- unkey:v1:<workspace_id>:logs/apiRequests#read
Request
- Base URLhttps://api.unkey.com
- URLhttps://api.unkey.com/v2/logs.listApiRequests
- AuthHTTP bearer
Request body
Example request
{
"cursor": "MTc5MjAyMTg1MDEyMzpyZXFfNTY3OGVmZ2g",
"filters": {
"time": {
"gte": 1791936000000,
"lt": 1792022400000
},
"path": {
"startsWith": [
"/v2/keys."
],
"notContains": [
"verifyKey"
]
},
"method": {
"is": [
"POST",
"PUT"
]
},
"requestId": {
"isNot": [
"api.unkey.dev"
]
},
"status": {
"gte": 400,
"lt": 600,
"isNot": [
429
]
}
}
}Response
A page of requests, newest first. When hasMore is true, send pagination.cursor to get the next page.
Example response
{
"meta": {
"requestId": "req_123"
},
"data": [
{
"requestId": "req_1234abcd",
"time": 1792021850123,
"host": "api.unkey.com",
"method": "POST",
"path": "/v2/keys.updateKey",
"status": 404,
"latencyMs": 38,
"requestHeaders": [
"Content-Type: application/json",
"Authorization: [REDACTED]"
],
"requestBody": "{\"keyId\":\"key_1234abcd\",\"name\":\"Payments\"}",
"responseHeaders": [
"Content-Type: application/json"
],
"responseBody": "{\"meta\":{\"requestId\":\"req_1234abcd\"},\"error\":{\"status\":404}}"
}
],
"pagination": {
"cursor": "eyJrZXkiOiJrZXlfMTIzNCIsInRzIjoxNjk5Mzc4ODAwfQ==",
"hasMore": true
}
}Changes
- info
removed the non-success response with the status
- info
- info
endpoint added
- info