start_discovery_scan
const url = 'https://example.com/api/v1/discovery/scan';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"communities":["example"],"credential_ids":["example"],"pool":"example","snmp_when_unreachable":true,"targets":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/discovery/scan \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "communities": [ "example" ], "credential_ids": [ "example" ], "pool": "example", "snmp_when_unreachable": true, "targets": [ "example" ] }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Start-scan body: explicit target IPs (the WebUI expands a CIDR), candidate stored credentials by id, and ad-hoc communities.
object
Poll-pool to run the sweep in (ADR-009/020). Absent/empty = legacy global discovery.
Try SNMP on addresses that do not answer ICMP.
Absent means no. Earlier releases had no such option and tried every address in the range with every candidate credential, which is why sweeping a /24 took minutes; set this to get that behaviour back, and with it a device that filters ICMP but answers SNMP.
Examplegenerated
{ "communities": [ "example" ], "credential_ids": [ "example" ], "pool": "example", "snmp_when_unreachable": true, "targets": [ "example" ]}Responses
Section titled “Responses”Sweep accepted; poll its status by id
The accepted scan’s id, for polling its status.
object
Examplegenerated
{ "scan_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}No targets or more than the cap, an unparseable address, or a named credential that is missing or unusable
The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI
document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies
undescribed — a client that has to guess the failure shape ends up parsing the success shape and
reading undefined.
object
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}No valid bearer token
The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI
document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies
undescribed — a client that has to guess the failure shape ends up parsing the success shape and
reading undefined.
object
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}Role lacks ManageConfig
The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI
document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies
undescribed — a client that has to guess the failure shape ends up parsing the success shape and
reading undefined.
object
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}Skeleton mode has no write side, or this core is not the HA leader
The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI
document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies
undescribed — a client that has to guess the failure shape ends up parsing the success shape and
reading undefined.
object
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}