REST API
The desktop app exposes a REST API on localhost:17655 for programmatic access. All endpoints are read-only (except the log ingestion endpoint).
Log ingestion
Section titled “Log ingestion”POST /logsContent-Type: application/jsonContent-Encoding: gzip (optional){ "projectId": "my-app", "logs": [ { "bucket": "api", "level": "info", "message": "Request handled", "timestamp": 1708214400000, "context": {}, "tags": {} } ]}Response: { "status": "ok", "processed": 0 }
The processed: 0 is because logs are processed asynchronously. The server returns immediately and handles storage in the background.
Supports gzip-compressed request bodies (set Content-Encoding: gzip header).
List projects
Section titled “List projects”GET /api/projectsReturns all projects:
[ { "id": "my-app", "name": "my-app", "workspaceId": "default", "createdAt": "..." }]List buckets
Section titled “List buckets”GET /api/projects/:projectId/bucketsReturns all buckets for a project:
[ { "id": "my-app:api", "name": "api", "projectId": "my-app", "createdAt": "..." }]Query logs
Section titled “Query logs”GET /api/logs?projectId=my-app&level=error,warn&bucket=api&search=failed&limit=50&since=1708000000000&until=1708300000000&beforeId=42| Param | Type | Description |
|---|---|---|
projectId | string | Required. Filter by project |
level | string | Comma-separated levels: info,debug,warn,error |
bucket | string | Comma-separated bucket names |
search | string | Substring search in messages |
limit | number | Max results (default: 100) |
since | number | Unix ms timestamp — logs after this time |
until | number | Unix ms timestamp — logs before this time |
beforeId | number | Pagination cursor — logs with ID less than this |
Response:
{ "logs": [ ... ], "count": 42, "hasMore": true}Tail logs
Section titled “Tail logs”GET /api/logs/tail?limit=20&level=error,warnReturns the latest logs across all projects. Useful for a “firehose” view.
| Param | Type | Description |
|---|---|---|
limit | number | Max results (default: 20) |
level | string | Comma-separated levels |
Using from scripts
Section titled “Using from scripts”# Get all error logs from the last hourcurl "http://localhost:17655/api/logs?projectId=my-app&level=error&since=$(($(date +%s)*1000 - 3600000))"
# Tail all logscurl "http://localhost:17655/api/logs/tail?limit=50"
# Send a log from the command linecurl -X POST http://localhost:17655/logs \ -H "Content-Type: application/json" \ -d '{"projectId":"scripts","logs":[{"bucket":"deploy","level":"info","message":"Deploy started","timestamp":'$(date +%s000)'}]}'