Node.js
import { Rewrite } from '@rewritetoday/sdk';
const rewrite = new Rewrite(process.env.REWRITE_API_KEY!);
const { data, error, cursor } = await rewrite.logs.list({
method: 'POST',
endpoint: '/messages',
status: 200,
limit: 25,
});
if (error) throw error;{
"ok": true,
"data": [
{
"id": "748395130237498880",
"method": "POST",
"endpoint": "/messages",
"status": 200,
"source": "API",
"sandbox": false,
"createdAt": "2026-03-20T14:22:31.562Z"
}
],
"cursor": {
"persist": true,
"after": "748395130237498414"
}
}Logs
List request logs
List API request logs recorded for the current project.
GET
/
logs
Node.js
import { Rewrite } from '@rewritetoday/sdk';
const rewrite = new Rewrite(process.env.REWRITE_API_KEY!);
const { data, error, cursor } = await rewrite.logs.list({
method: 'POST',
endpoint: '/messages',
status: 200,
limit: 25,
});
if (error) throw error;{
"ok": true,
"data": [
{
"id": "748395130237498880",
"method": "POST",
"endpoint": "/messages",
"status": 200,
"source": "API",
"sandbox": false,
"createdAt": "2026-03-20T14:22:31.562Z"
}
],
"cursor": {
"persist": true,
"after": "748395130237498414"
}
}Authorizations
Send your API key as Authorization: Bearer rw_....
Required scope: project:logs:read.
Query Parameters
Cursor for forward pagination. Send exactly one of after or before when paginating.
Example:
"748395130237498412"
Cursor for backward pagination. Send exactly one of after or before when paginating.
Example:
"748395130237498412"
Page size. Backend cursor schemas validate this between 2 and the route-specific maximum.
Required range:
2 <= x <= 100Filter by HTTP status code.
Required range:
100 <= x <= 600Filter by HTTP method.
Example:
"POST"
Filter by request endpoint path.
Example:
"/messages"