REST API
The desktop app exposes a REST API on localhost:17655 for programmatic access. CORS is enabled for all origins. 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, "tags": { "route": "/users", "method": "GET" }, "context": { "latencyMs": 42 }, "traceId": "trace-123", "userId": "u_456", "sessionId": "sess_abc", "env": "production", "appName": "my-app", "appVersion": "1.0.0" } ]}Response: { "status": "ok", "processed": 0 }
The processed: 0 is because logs are processed asynchronously. The server returns 200 immediately and handles storage in the background (100ms flush interval, max 50 per batch). Tags are extracted and indexed. Tauri events are emitted to update the frontend in real-time.
Supports gzip-compressed request bodies (set Content-Encoding: gzip header).
Auto-creation: New projects are created in the default workspace. New buckets are auto-created per project. Each new project gets a default “All Logs” filter.
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&tags=env:prod| 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 |
tags | string | Tag filters |
limit | number | Max results (default: 1000) |
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, max: 100) |
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)'}]}'