Provision a daemon, or re-provision an existing one
Creates a daemon record on the server before the daemon is installed, mints an API key bound to it 1:1, and returns ready-to-run install artifacts.
When daemon_id is supplied the existing record is reused instead of creating a new one —
this both re-issues install artifacts after install config changes and gives a legacy daemon
(one with no bound key) a pathway to a dedicated key without losing its host, discovery jobs,
or history.
Returns the daemon record and an API key that must be configured on the daemon.
User API key (Bearer scp_u_...). Create in Platform > API Keys.
In: header
Request Body
application/json
Mint a fresh 1:1 key for this existing daemon instead of creating a new record,
keeping its host, discovery jobs and history. Used to give a legacy daemon (no bound
key) a dedicated one. When set, name/network_id/mode/url are ignored — those
come from the existing record.
Only accepted for a daemon that has never checked in or has no bound key; a live provisioned daemon is refused, since it has no way to learn the new key.
Note: install commands are not generated here — call the install-command endpoint, which builds them idempotently and fills in the key this response returns.
uuidHow the daemon communicates with the server. Defaults to DaemonPoll (the daemon dials out) for forward-compat with older clients.
"server_poll" | "daemon_poll"Human-readable name for the daemon. Required unless daemon_id is set, in which case
the existing record's name is kept.
Network this daemon will be associated with. Required unless daemon_id is set, in
which case the existing record's network is kept.
uuidCredential/integration references to seed onto the daemon's first discovery run. References only — never secret material. Empty by default.
Reachable URL where the server can dial the daemon. Required for ServerPoll, unused for DaemonPoll (the daemon dials out instead).
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://app.scanopy.net/api/v1/daemons/provision" \ -H "Content-Type: application/json" \ -d '{}'{
"meta": {
"api_version": 1,
"server_version": "0.17.7"
},
"success": true,
"data": {
"daemon": {
"created_at": "2019-08-24T14:15:22Z",
"host_id": "eb4e20fc-2b4a-4d0c-811f-48abcf12b89b",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"interfaced_subnet_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"mode": "server_poll",
"name": "string",
"network_id": "d6797cf4-42b9-4cad-8591-9dd91c3f0fc3",
"tags": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"updated_at": "2019-08-24T14:15:22Z",
"url": "https://daemon.example.com:60073",
"user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
"version_status": {
"status": "Current",
"has_correct_docker_volume_mount": true,
"sunset_date": "string",
"supports_targeted_rescan": true,
"supports_unified_discovery": true,
"version": "string",
"warnings": [
{
"message": "string",
"severity": "Info",
"sunset_date": "string"
}
]
},
"api_key_id": "b0dd218e-3bcf-4bdb-a1e3-0689d60a8afd",
"is_unreachable": true,
"last_seen": "2019-08-24T14:15:22Z",
"standby": true,
"standby_cleared_at": "2019-08-24T14:15:22Z",
"version": "0.17.7"
},
"daemon_api_key": "pa$$word"
},
"error": "string"
}{
"meta": {
"api_version": 1,
"server_version": "0.17.7"
},
"success": true,
"code": "string",
"error": "string",
"params": {
"property1": null,
"property2": null
}
}{
"meta": {
"api_version": 1,
"server_version": "0.17.7"
},
"success": true,
"code": "string",
"error": "string",
"params": {
"property1": null,
"property2": null
}
}{
"meta": {
"api_version": 1,
"server_version": "0.17.7"
},
"success": true,
"code": "string",
"error": "string",
"params": {
"property1": null,
"property2": null
}
}