reference

HTTP API

The console is a client of this API; anything it does, a script can do. Send an API key, or sign in and use the session cookie. Every list is filtered to the companies the caller may see; anything out of scope answers 404.

Authentication and scope

export BE=https://hub.[yourdomain]; export K="Authorization: Bearer bek_…"
curl -H "$K" $BE/me                    # who am I, role, companies
curl -H "$K" "$BE/agents?tenant=t_…"   # every list accepts ?tenant=

Mutating actions that reach a machine need ?approved=yes on the request; that is the API form of the approval click, and the caller's name is recorded.

Machines

method and pathwhat
GET /agentsevery visible machine with its latest heartbeat
GET /agents/sparks24 h disk and CPU points per machine, disk growth per day and days to full
GET /agents/:id/trend?range=24h|7d|30done machine's series (raw for 24 h, hourly beyond)
GET /agents/:id/samples|events|checks/historyhistory from the hub's tables
POST /agents/:id/call {tool, args}call a tool; read tools run, mutating tools need ?approved=yes
GET and PUT /agents/:id/checks; POST /agents/:id/checks/runthe check document (PUT needs approval); evaluate now
PUT /agents/:id/profile {display_name, notes}; PUT /agents/:id/tags; PUT /agents/:id/ainame and notes, tags, BE AI scope
PUT /agents/:id/target {version}; PUT /agents/:id/tenant {tenant_id}roll-out target; move to another company (superadmin)
DELETE /agents/:idforget an offline machine (superadmin)

BE AI

method and pathwhat
POST /agents/:id/ask {question} or {thread_id, question} or {proposal_id, thread: true, question}start a run; add ?wait=yes to block for the result
GET /runs, GET /runs/:idruns with conclusions; one run with its transcript
GET /threads, GET /threads/:idconversations
GET /proposals; POST /proposals/:id/approve|reject|retrythe approvals queue and decisions
GET /schedule; POST /tenants/:id/schedule/runthe nightly pass evaluation; run it now

Alerts

method and pathwhat
GET /alerts?status=active|open|acked|resolved|allalerts
POST /alerts/:id/ack|resolvedecisions
GET, POST, PUT, DELETE /alert-rules; POST /alert-rules/:id/testnotification rules per company
GET /notificationsdeliveries

Companies and users

method and pathwhat
GET, POST /tenants; PUT /tenants/:id {name, notes, disabled, settings}companies (create, rename, disable and settings are superadmin)
POST /tenants/:id/install-key; POST /tenants/:id/tokenrotate the install link; rotate the enrollment token (superadmin)
GET, POST /operators; PUT /operators/:id; POST /operators/:id/password|keyusers, disable, temporary password, new key
GET /usage?month=YYYY-MMmachines, runs, tokens and estimated cost per company

Releases and the hub

method and pathwhat
GET /updates; POST /updates/rollout {version, agents|tenant|tag|all}versions against targets; roll out
GET /dl/; GET /dl/:version/:file; PUT /dl/:version/:file; PUT /dl/latestreleases index and files; publish (admin)
GET /events; GET /audit; GET /trend?range=; GET /statshub-wide history, audit trail, fleet series, counts (admin)
POST /login; POST /logout; POST /me/passwordsessions

Try it on one machine first.

The install line takes a minute. Uninstall the agent and you are out.