Get run logs
Get persisted log entries for a run, wrapped in the standard list envelope { object: "list", data, hasMore }. Pass ?since=<id> to receive only entries with id > since — the cursor used by the CLI's polling tail to bound per-poll payload growth, and the pagination cursor when combined with ?limit=. Pass ?level= to filter by minimum severity (level=info skips debug breadcrumbs). limit defaults to 1000 when omitted — the response is never unbounded; when more entries follow, hasMore is true and an RFC 5988 Link: <…?since=<lastId>>; rel="next" response header points at the next page. id is a monotonic int64 (one sequence across all runs, so consecutive entries of a run are not contiguous); invalid since/level/limit values fall back to the default rather than 400 so a stale cursor never breaks a polling tail. Rate-limited to 120/min per identity. Note: tool-result payloads inside data are truncated at write time by the runner (default 2048 bytes, operator-tunable via TOOL_RESULT_BYTE_LIMIT) — entries already persisted truncated cannot be recovered by this endpoint.
/api/runs/{id}/logsCookie session from Better Auth. Requires X-Org-Id header for org-scoped routes.
In: cookie
Path Parameters
Query Parameters
Return only log entries with id > since. Used by the CLI's appstrate run remote polling loop to fetch incremental tails without re-shipping the full history each poll, and as the cursor in the Link; rel="next" pagination header.
int640 <= valueMinimum severity to include (debug < info < warn < error). level=info returns info, warn and error entries. Defaults to debug (everything).
"debug" | "info" | "warn" | "error"Maximum number of entries to return. Defaults to 1000 when omitted. When more entries follow, the response carries a Link; rel="next" header whose URL re-uses since as the cursor — page with it to read longer histories.
10001 <= value <= 1000Header Parameters
Organization ID. Required for cookie auth. Not needed for API key auth (org resolved from key).
uuidSpace ID. Required for space-scoped routes (agents, runs, schedules, and space-scoped module routes). Not needed for API key auth (space resolved from key).
curl -X GET "https://your-instance/api/runs/string/logs"{
"object": "list",
"data": [
{
"id": 0,
"runId": "string",
"orgId": "string",
"type": "string",
"level": "debug",
"event": "string",
"message": "string",
"data": {},
"createdAt": "2019-08-24T14:15:22Z"
}
],
"hasMore": true
}{
"type": "https://docs.appstrate.dev/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "Invalid or missing session",
"code": "unauthorized",
"request_id": "req_abc123"
}{
"type": "https://docs.appstrate.dev/errors/forbidden",
"title": "Forbidden",
"status": 403,
"detail": "Insufficient permissions",
"code": "forbidden",
"request_id": "req_abc123"
}{
"type": "https://docs.appstrate.dev/errors/not-found",
"title": "Not Found",
"status": 404,
"detail": "Resource not found",
"code": "not_found",
"request_id": "req_abc123"
}{
"type": "https://docs.appstrate.dev/errors/rate-limited",
"title": "Rate Limited",
"status": 429,
"detail": "Too many requests. Please try again shortly.",
"code": "rate_limited",
"request_id": "req_abc123",
"retry_after": 30
}