Daemons
internal

Email install command to current user

Changed on

Requires a verified email: the endpoint mails on demand, so an unproven address would let anyone send Scanopy mail to an inbox they don't own.

Session-only, and IsUser says so at the extractor rather than in the body. "The current user" has no answer for an automation identity: a user API key carries user_id but no address, so this endpoint could never serve one. An API key that wants the command reads it directly from GET /api/v1/daemons/{id}/install-command.

post/api/v1/daemons/email-install-command

Request

  • Base URL
    https://app.scanopy.net
  • URL
    https://app.scanopy.net/api/v1/daemons/email-install-command
  • Auth
    API key in cookie session_id

Request body

accept_invalid_scan_certsboolean nullable

Continue scanning targets that present an untrusted certificate.

allow_self_signed_certsboolean nullable

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

bind_addressstring nullable

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

credential_refsstring nullable

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

heartbeat_intervalinteger nullable

How often the daemon reports in, in seconds.

interfacesstring nullable

Comma-separated interface names.

log_filestring nullable

Path the daemon should write its log file to.

log_levelstring nullable

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

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.

api_keystring nullable

The daemon's api key, from the provision response. Required when purpose embeds the key (install, rekey) and rejected otherwise. The server stores only its hash, so it can't fill the key in itself; it checks this one against the daemon's bound key.

daemon_idstring uuid required

The daemon whose command to send.

dockerboolean

Send the docker compose instead of the binary command. Linux only.

os'linux' | 'macos' | 'windows' | 'freebsd' required

Operating system a daemon is installed on, as picked when it is created.

Response

Email sent

dataTupleUnit

No payload. Present only so the envelope keeps its shape.

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

    • info

      api tag internal added

    • breaking

      added subschema #2 to the request body allOf list

    • breaking

      the request's body type changed from object to no type

    • warning

      removed the request property

    • warning

      removed the request property

    • info

      added the non-success response with the status