automaintainer/ docs
Dashboard →

API reference

The panel exposes a JSON API used by the dashboard. All routes require an authenticated session (cookie) or a bearer token; all data is scoped to your account.

Repos

Method Path Purpose
GET /api/repos List your repos
POST /api/repos Add a repo
GET /api/repos/{id} Repo detail
PATCH /api/repos/{id} Update settings (focus, verify_cmd, team, schedule, explore…)
POST /api/repos/{id}/run Trigger a run
GET /api/repos/{id}/runs Recent runs for the repo

Explore mode

Method Path Purpose
POST /api/repos/{id}/explore Kick a read‑only scout (Pro+)
GET /api/repos/{id}/candidates Proposed candidates
GET /api/repos/{id}/explore-stats Campaign counts (proposed/selected/rejected/done)
POST /api/candidates/{id}/run Apply a candidate's focus+gate and run it
POST /api/candidates/{id}/reject Dismiss a candidate

Runs

Method Path Purpose
GET /api/runs List runs
GET /api/runs/{id} Run detail
GET /api/runs/{id}/bus Live agent bus for the run
POST /api/runs/{id}/pr Recover a PR for a pushed run

Workers

Method Path Purpose
GET /api/worker/status Connected workers + health/probes
GET /api/worker/models?cli=… Models available on a worker
POST /api/worker/probe On‑demand reachability test of a {cli, model}
PATCH /api/workers/{id} Enable/disable a worker

Memory

Method Path Purpose
GET /api/repos/{id}/memories List repo memories
POST /api/repos/{id}/memories Add a memory
DELETE /api/repos/{id}/memories/{mid} Delete a memory

Account

Method Path Purpose
GET /api/account Account details, plan and usage
GET /api/account/license Worker license key
POST /api/account/license?notify_workers=1 Rotate license key and, when opted in, push the new token to connected workers

License rotation

POST /api/account/license returns a new license_key. Pass a truthy notify_workers as a query parameter (?notify_workers=1) or in the JSON body ({"notify_workers": true}) to immediately push a token_rotated command to all connected workers. The response includes notified_workers (bool) and notified_workers_count (int). The broadcast is best-effort and non-blocking; offline workers, or workers whose send buffers are full at the moment of rotation, must still be updated with the new --token before reconnecting.

Accepted truthy values are case-insensitive: 1, true, t, yes, y, on. The query parameter takes precedence over the JSON body, so a stale body value cannot override an explicit ?notify_workers= string.

Example

curl -s -H "Authorization: Bearer $TOKEN" \
  -X POST "https://automaintainer.intrane.fr/api/account/license?notify_workers=1"

Or pass the opt-in as JSON so a dashboard or scripted client can keep the parameter in the request body:

curl -s -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -X POST "https://automaintainer.intrane.fr/api/account/license" \
  -d '{"notify_workers": true}'
{
  "license_key": "am_...",
  "notified_workers": true,
  "notified_workers_count": 2
}