Daemons
internal

Request work from server

Internal endpoint for daemons to poll for pending discovery sessions. Also updates heartbeat and returns any pending cancellation requests. Returns tuple of (next_session, should_cancel).

post/api/daemons/{id}/request-work

Path parameters

idstring uuid required

Daemon ID

Request body

has_docker_socketboolean

Whether the daemon has access to a Docker socket.

mode'server_poll' | 'daemon_poll' required

Daemon operating mode that determines the communication pattern.

  • DaemonPoll (formerly "Pull"): Daemon makes outbound connections to the server. The daemon registers itself and polls for work. Best for daemons behind NAT/firewall.

  • ServerPoll (formerly "Push"): Server makes connections to the daemon. Server polls daemon for status and discovery results. Best for DMZ deployments where daemon cannot make outbound connections.

namestring required
ready_for_workboolean

Whether the daemon can accept a new discovery session. Both DaemonPoll and ServerPoll use this to avoid dispatching work to a busy daemon.

urlstring nullable

URL is not used by server - kept for backwards compat. Server never updates daemon URL from status (URL is set during provisioning).

versionstring nullable

Daemon software version (semver format)

Example request

{
  "interfaced_subnets": [
    {
      "cidr": "192.168.1.0/24",
      "created_at": "2026-01-15T10:30:00Z",
      "description": "Local area network",
      "id": "550e8400-e29b-41d4-a716-446655440004",
      "name": "LAN",
      "network_id": "550e8400-e29b-41d4-a716-446655440002",
      "source": {
        "type": "Manual"
      },
      "subnet_type": "Lan",
      "tags": [],
      "updated_at": "2026-01-15T10:30:00Z"
    }
  ]
}

Response

Work request processed - returns (Option<Value>, bool)

Changes