v62

latestOpenAPI 3.1.0Dual (AGPL3.0, Commercial License Available)raw.githubusercontent.com2026-08-03211303932.5 KB
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

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

Name the daemon reports for itself.

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",
      "first_discovery_id": null,
      "id": "550e8400-e29b-41d4-a716-446655440004",
      "last_discovery_id": null,
      "last_seen_at": "2026-01-15T10:30:00Z",
      "lineage_id": null,
      "name": "LAN",
      "network_id": "550e8400-e29b-41d4-a716-446655440002",
      "source": {
        "type": "Manual"
      },
      "subnet_type": "Lan",
      "tags": [],
      "updated_at": "2026-01-15T10:30:00Z",
      "valid_from": "2026-01-15T10:30:00Z",
      "valid_to": null
    }
  ]
}

Response

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