Skip to content

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

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

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
ParamTypeDescription
projectIdstringRequired. Filter by project
levelstringComma-separated levels: info,debug,warn,error
bucketstringComma-separated bucket names
searchstringSubstring search in messages
limitnumberMax results (default: 100)
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)
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)'}]}'