Daemons

Generate daemon install command

Changed on

A pure, idempotent builder — it never mints or persists anything. The api key in an install or rekey command is a placeholder (<API_KEY>) the caller substitutes from the plaintext it holds; a reconfigure command carries no key at all. Minting is a separate mutation (POST /provision), so regenerating a command here (advanced-setting change, OS switch, the Details reconfigure view) never rotates the daemon's key.

The server derives the exact command shape from the record: DaemonPoll vs ServerPoll for the flags, and — for rekey — whether the daemon has checked in (last_seen) to decide whether the command names the existing install it re-keys. An install command reads the same before and after the daemon's first handshake.

get/api/v1/daemons/{id}/install-command

Request

  • Base URL
    https://app.scanopy.net
  • URL
    https://app.scanopy.net/api/v1/daemons/{id}/install-command
  • Auth
    • API key in header Authorization
    • or API key in cookie session_id

Path parameters

idstring uuid required

daemon ID

Query parameters

purpose'install' | 'rekey' | 'reconfigure' required

What the caller wants the command to do — the one axis that actually varies.

install brings a new daemon up: it carries the api-key placeholder, fetches the binary, and spells out the connectivity + advanced config, and nothing else. rekey is the same command for a daemon that already exists on a host (a legacy daemon getting its first bound key), so once that daemon has connected it also names the install to act on. reconfigure adjusts an already-installed daemon in place: no key, no fetch, just the server-held connectivity — scanopy-daemon install layers it over the existing config.json.

install and rekey are separate because the record can't tell them apart: a daemon created in the wizard has last_seen set as soon as it connects, and the wizard refetches its command after that, which must not change shape.

install or rekey (with the api-key placeholder), or reconfigure (credential-free).

log_levelstring nullable

Log verbosity the daemon should run at (e.g. info, debug).

log_filestring nullable

Path the daemon should write its log file to.

heartbeat_intervalinteger nullable

How often the daemon reports in, in seconds.

bind_addressstring nullable

Address and port the daemon should listen on, for server-polled mode.

allow_self_signed_certsboolean nullable

Accept a self-signed certificate when connecting back to the server.

accept_invalid_scan_certsboolean nullable

Continue scanning targets that present an untrusted certificate.

interfacesstring nullable

Comma-separated interface names.

credential_refsstring nullable

Comma-separated credential/integration tokens (for the docker-compose env).

Response

Install command

errorstring nullable

Not sent on a successful response. Failure messages arrive in an ApiErrorResponse.

successboolean required

Always true on a successful response.

Example response

{
  "meta": {
    "api_version": 1,
    "server_version": "0.19.4"
  }
}

Changes