Skip to content

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).

POST /logs
Content-Type: application/json
Content-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.

GET /api/projects

Returns all projects:

[
{ "id": "my-app", "name": "my-app", "workspaceId": "default", "createdAt": "..." }
]
GET /api/projects/:projectId/buckets

Returns all buckets for a project:

[
{ "id": "my-app:api", "name": "api", "projectId": "my-app", "createdAt": "..." }
]
GET /api/logs?projectId=my-app&level=error,warn&bucket=api&search=failed&limit=50&since=1708000000000&until=1708300000000&beforeId=42&tags=env:prod
ParamTypeDescription
projectIdstringRequired. Filter by project
levelstringComma-separated levels: info,debug,warn,error
bucketstringComma-separated bucket names
searchstringSubstring search in messages
tagsstringTag filters
limitnumberMax results (default: 1000)
sincenumberUnix ms timestamp — logs after this time
untilnumberUnix ms timestamp — logs before this time
beforeIdnumberPagination cursor — logs with ID less than this

Response:

{
"logs": [ ... ],
"count": 42,
"hasMore": true
}
GET /api/logs/tail?limit=20&level=error,warn

Returns the latest logs across all projects. Useful for a “firehose” view.

ParamTypeDescription
limitnumberMax results (default: 20, max: 100)
levelstringComma-separated levels
Terminal window
# Get all error logs from the last hour
curl "http://localhost:17655/api/logs?projectId=my-app&level=error&since=$(($(date +%s)*1000 - 3600000))"
# Tail all logs
curl "http://localhost:17655/api/logs/tail?limit=50"
# Send a log from the command line
curl -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)'}]}'