Daemon
The daemon process itself: this OpenAPI document and graceful shutdown.
On this page
This OpenAPI document
/openapi.jsonResponses
| Status | Description | Body |
|---|---|---|
| 200 | OpenAPI 3.1 document | OpenApiDocument |
Errors 401 · 403
| 401 | Missing or wrong bearer token (unauthorized) | |
| 403 | The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin |
Error bodies use the error format.
Example
curl "http://127.0.0.1:7385/openapi.json" \
-H "Authorization: Bearer $ADF_DAEMON_TOKEN"Stop the daemon gracefully (loopback only)
/daemon/shutdownAnswers 202 first, then runs the same bounded shutdown as Ctrl+C / SIGTERM: the HTTP server closes (3 s deadline), every agent is unloaded in immediate mode (running turns are cut, no 5 s grace) under a per-agent deadline (10 s, ADF_SHUTDOWN_TIMEOUT_MS), compute containers stop, and the process exits; the whole shutdown is capped at 20 s. adf daemon stop uses it; on Windows it is the only graceful way to stop a detached daemon. Local callers only (see Local-only routes: never through a proxy). No body.
Header parameters
| Name | Type | Description |
|---|---|---|
X-ADF-Local-Proof | string | Required only when the daemon runs with |
Responses
| Status | Description | Body | ||||||
|---|---|---|---|---|---|---|---|---|
| 202 | Accepted; the daemon exits shortly | ShutdownAccepted | ||||||
| ||||||||
Errors 401 · 403 · 405
| 401 | Missing or wrong bearer token (unauthorized) | |
| 403 | Not a local caller (loopback_only): the request came from another machine, through a proxy (forwarded headers), or: with ADF_DAEMON_BEHIND_PROXY, without this machine's X-ADF-Local-Proof. Owner secrets and shutdown are handled on the daemon host only. Or the request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)loopback_onlyhost_not_allowedcross_origin | |
| 405 | Shutdown is not available on this daemon |
Error bodies use the error format.
Example
curl -X POST "http://127.0.0.1:7385/daemon/shutdown" \
-H "Authorization: Bearer $ADF_DAEMON_TOKEN"{
"accepted": true,
"pid": 41230
}