List workspace logs
curl --request GET \
--url http://127.0.0.1:8765/v1/workspaces/{workspace_id}/logs \
--header 'Authorization: Bearer <token>'import requests
url = "http://127.0.0.1:8765/v1/workspaces/{workspace_id}/logs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://127.0.0.1:8765/v1/workspaces/{workspace_id}/logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"items": [
{
"id": "line_019a5e2c-7b41-7c3e-9f20-4d8e1a6b5c37",
"command": "echo hi",
"cwd": "/",
"started_at": "2026-11-07T00:00:01.000Z",
"duration_ms": 7,
"exit_code": 0,
"stdout": "hi\n",
"stderr": "",
"user_id": null,
"api_key_id": null,
"mounts": []
}
],
"next": null
}Lifecycle
List workspace logs
GET
/
v1
/
workspaces
/
{workspace_id}
/
logs
List workspace logs
curl --request GET \
--url http://127.0.0.1:8765/v1/workspaces/{workspace_id}/logs \
--header 'Authorization: Bearer <token>'import requests
url = "http://127.0.0.1:8765/v1/workspaces/{workspace_id}/logs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://127.0.0.1:8765/v1/workspaces/{workspace_id}/logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"items": [
{
"id": "line_019a5e2c-7b41-7c3e-9f20-4d8e1a6b5c37",
"command": "echo hi",
"cwd": "/",
"started_at": "2026-11-07T00:00:01.000Z",
"duration_ms": 7,
"exit_code": 0,
"stdout": "hi\n",
"stderr": "",
"user_id": null,
"api_key_id": null,
"mounts": []
}
],
"next": null
}List completed commands with captured output and related file operations, newest first.
Use
See error examples and recovery steps. The complete OpenAPI contract includes every response schema.
limit and after for pagination, or format=jsonl to export all matching commands. Log retention depends on the server.
Errors
Errors
| Status | Meaning |
|---|---|
400 | The request is malformed: the body is not JSON (invalid_json) or not a JSON object, a field is missing (missing_field), unknown (unknown_field) or has a wrong value (invalid_value), or the request is otherwise invalid (invalid_request). param names the field at fault. |
401 | The token is missing or wrong (unauthorized). |
404 | The workspace, session, job, file or route does not exist, or the caller may not see it (not_found). |
429 | Past a rate limit (rate_limited), or a new session past max_sessions (session_limit). |
403 | The call is refused. A policy refused it (policy_refused, with decision), a mount mode or permission refused it (forbidden), the backend is out of space or quota (storage_full), or the request came for a host or from a browser origin that is not allowed (host_not_allowed, origin_not_allowed). |
Authorizations
Query Parameters
Use json for paginated results, newest first, or jsonl to export all retained matches oldest first. JSONL ignores limit and after and contains command, vfs, and result records linked by parent. Each record has a timestamp, an RFC 3339 string in UTC. Values other than jsonl select JSON.