BucktDocs

List logs

GET/v1/logslogs:read

Returns 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:

PlanRetention
Free7 days
Pro30 days
Enterprise90 days

Records older than your plan's window are not returned even if from is set further back.

Query parameters

NameTypeDefaultDescription
fromstringISO 8601 lower bound on `createdAt`. Capped to your plan retention window if older.
tostringISO 8601 upper bound on `createdAt`.
methodstringHTTP method, e.g. `GET`, `POST`, `PUT`, `PATCH`, `DELETE`.
statusstringExact 3-digit code (e.g. `404`) or status class (`2xx`, `3xx`, `4xx`, `5xx`).
pathstringPrefix match against the request path (e.g. `/v1/buckets`).
apiKeyIdstringRestrict to requests authenticated with this API key id.
bucketIdstringRestrict to requests targeting this bucket id.
cursorstringPagination cursor returned in `meta.nextCursor` from a previous request.
limitnumber20Page 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
  }
}