Skip to content

Core API reference

daemonitor-cored exposes an HTTP/1.1 API exclusively over local IPC—never on a TCP network port:

  • macOS / Linux: Unix domain socket (0600) at <appSupportDir>/daemonitor-core.sock
  • Windows: Per-user named pipe \\.\pipe\daemonitor-core-<UserSID> (DACL restricted to current user SID)

API stability

The /v1/* IPC endpoints primarily serve daemonitor-cli, the Desktop application, and local integrations (such as the experimental Gradle plugin). Endpoints marked Internal / Experimental may evolve between minor releases.

Endpoints

Method Path Stability Purpose
GET /v1/health Stable Core status, version, socket path, sample count, and DB path
GET /v1/capabilities Stable Platform metric availability matrix (schema_version: 1)
GET /v1/self Internal Core self-telemetry, active polling cadences, and probe_concurrency
GET /v1/host Stable Latest host CPU, memory, swap, load, and OS pressure/thermal/PSI/commit metrics
GET /v1/processes Stable Latest cached process snapshot ({ sampled_at_ms, host, processes })
GET /v1/processes/history Stable Retained historical process samples (since_ms, limit, type, pid)
GET /v1/processes/jvm-flags Internal Inspect JVM flags for monitored JVM processes
GET /v1/events Stable Process lifecycle events (since_ms, limit)
GET /v1/daemon-logs Internal Discovered Gradle daemon .out.log files
GET /v1/daemon-logs/{pid}/tail Internal Redacted tail lines and parsed events for a daemon PID (400/404 on invalid/missing PID)
GET /v1/builds Stable Correlated build history (limit, pid, start_time_ms, daemon_pid, daemon_identity, project, status, since_ms, include_logs)
POST /v1/observation-sessions/open Stable Open a Gradle plugin build observation session
POST /v1/observation-sessions/close Stable Close a Gradle plugin build observation session and return build summary
GET /v1/sessions Stable List observation sessions (ecosystem, limit default 50, max 500)
POST /v1/sessions Stable Open an explicit CLI observation session (201 Created, 409 Conflict if duplicate open); redacts command_line and wakes poll loop
GET /v1/sessions/{id} Stable Retrieve one observation session summary with process & role rollups (404 if missing)
POST /v1/sessions/{id}/close Stable Trigger final refresh, close session, persist Xcode summary to builds, and return sessions.Summary (idempotent)

Query parameters and limits

  • /v1/processes/history: since_ms (default now - 15m), limit (default 100, max 5000), type, pid.
  • /v1/events: since_ms (default 0), limit (default 100, max 5000).
  • /v1/builds: limit (default 100, max 5000), pid + start_time_ms (daemon-scoped), project, status, since_ms, include_logs=true.

Example: querying /v1/health over Unix socket

curl --unix-socket "$HOME/Library/Application Support/Daemonitor/daemonitor-core.sock" \
  http://localhost/v1/health

Representative response:

{
  "status": "ok",
  "version": "1.4.0",
  "socket": "/Users/alice/Library/Application Support/Daemonitor/daemonitor-core.sock",
  "sample_count": 412,
  "db_path": "/Users/alice/Library/Application Support/Daemonitor/watcher.db"
}