Provision a daemon, or re-provision an existing one
Creates a daemon record on the server before the daemon is installed and mints an API key bound to it 1:1. Returns the daemon record and that key, which is shown only once and must be configured on the daemon.
When daemon_id is supplied the existing record is reused instead of creating a new one,
giving a legacy daemon (one with no bound key) a pathway to a dedicated key without losing
its host, discovery jobs, or history. Re-provisioning always mints a fresh key.
Install commands are not built here — fetch them from the install-command endpoint, which builds them idempotently and fills in the key this returns. That keeps a display-only regenerate (an OS switch, an advanced-setting change) from re-minting the key.
User API key (Bearer scp_u_...). Create in Platform > API Keys.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Request to pre-provision a daemon (either mode) before it is installed. This creates the daemon record + its 1:1 API key on the server so the install command shrinks to two flags.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/daemons/provision" \ -H "Content-Type: application/json" \ -d '{}'{
"meta": {
"api_version": 1,
"server_version": "0.17.14"
},
"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": [
"c160b63e-4109-4659-9169-fdbff6fc96f8"
],
"mode": "server_poll",
"name": "string",
"network_id": "d6797cf4-42b9-4cad-8591-9dd91c3f0fc3",
"tags": [
"a424dc99-d215-4281-ad2d-a3a9bc179925"
],
"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.14"
},
"success": true,
"code": "string",
"error": "string",
"params": {
"property1": null,
"property2": null
}
}{
"meta": {
"api_version": 1,
"server_version": "0.17.14"
},
"success": true,
"code": "string",
"error": "string",
"params": {
"property1": null,
"property2": null
}
}{
"meta": {
"api_version": 1,
"server_version": "0.17.14"
},
"success": true,
"code": "string",
"error": "string",
"params": {
"property1": null,
"property2": null
}
}Email install command to current user
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`.
Retry connection to unreachable daemon
Resets the is_unreachable flag for a daemon that was marked unreachable due to repeated polling failures. The poller will attempt to contact the daemon again on the next cycle.