List logs
GET
/v1/logslogs:readReturns a summary for each captured request: id, method, path,
statusCode, durationMs, apiKeyId, bucketId, errorMessage,
createdAt. The list endpoint omits headers and bodies to keep
responses small — fetch Get log for the full record.
Sensitive fields are redacted at capture time. Only the headers content-type,
content-length, accept, user-agent, referer, origin, and
x-request-id are stored. Body fields whose key matches password,
secret, token, apiKey, key, secretAccessKey, etc. are replaced
with "[REDACTED]". Bodies are capped at 8 KB; binary uploads/downloads
store only { object: "binary", bytes }.
Each plan has a different log retention window:
| Plan | Retention |
|---|---|
| Free | 7 days |
| Pro | 30 days |
| Enterprise | 90 days |
Records older than your plan's window are not returned even if from
is set further back.
Query parameters
| Name | Type | Default | Description |
|---|---|---|---|
| from | string | — | ISO 8601 lower bound on `createdAt`. Capped to your plan retention window if older. |
| to | string | — | ISO 8601 upper bound on `createdAt`. |
| method | string | — | HTTP method, e.g. `GET`, `POST`, `PUT`, `PATCH`, `DELETE`. |
| status | string | — | Exact 3-digit code (e.g. `404`) or status class (`2xx`, `3xx`, `4xx`, `5xx`). |
| path | string | — | Prefix match against the request path (e.g. `/v1/buckets`). |
| apiKeyId | string | — | Restrict to requests authenticated with this API key id. |
| bucketId | string | — | Restrict to requests targeting this bucket id. |
| cursor | string | — | Pagination cursor returned in `meta.nextCursor` from a previous request. |
| limit | number | 20 | Page size. Range 1–100. |
Example request
import { Buckt } from "@buckt/sdk";
const client = new Buckt({ apiKey: process.env.BUCKT_API_KEY });
const { data, meta } = await client.logs.list({
from: new Date(Date.now() - 24 * 60 * 60 * 1000),
status: "5xx",
limit: 50,
});Responses
{
"data": [
{
"object": "log",
"id": "log_01J5XXXXXXXXXXXXXXXXXXXXXX",
"method": "POST",
"path": "/v1/buckets",
"statusCode": 201,
"durationMs": 142,
"apiKeyId": "key_01J5UPLOADERXXXXXXXXXXXXXX",
"bucketId": null,
"errorMessage": null,
"createdAt": "2026-04-25T11:42:00Z"
},
{
"object": "log",
"id": "log_01J5XXXXXXXXXXXXXXXXXXXXXY",
"method": "GET",
"path": "/v1/buckets/bkt_01H8XYZABCDEFGHJKMNPQRSTVW",
"statusCode": 404,
"durationMs": 28,
"apiKeyId": "key_01J5UPLOADERXXXXXXXXXXXXXX",
"bucketId": "bkt_01H8XYZABCDEFGHJKMNPQRSTVW",
"errorMessage": "Bucket not found",
"createdAt": "2026-04-25T11:41:50Z"
}
],
"error": null,
"meta": {
"nextCursor": "MjAyNi0wNC0yNVQxMTo0MTo1MFp8bG9nXzAxSjVYWFhYWFhYWFhYWFhYWFhYWFlYWFlY",
"limit": 50
}
}