コンテンツにスキップ

start_discovery_scan

POST
/api/v1/discovery/scan
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", "targets": [ "example" ] }'
Media typeapplication/json

Start-scan body: explicit target IPs (the WebUI expands a CIDR), candidate stored credentials by id, and ad-hoc communities.

object
communities
Array<string>
credential_ids
Array<string>
pool

Poll-pool to run the sweep in (ADR-009/020). Absent/empty = legacy global discovery.

string | null
targets
required
Array<string>
Examplegenerated
{
"communities": [
"example"
],
"credential_ids": [
"example"
],
"pool": "example",
"targets": [
"example"
]
}

Sweep accepted; poll its status by id

Media typeapplication/json

The accepted scan’s id, for polling its status.

object
scan_id
required
string format: uuid
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

Media typeapplication/json

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
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

No valid bearer token

Media typeapplication/json

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
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

Role below Admin

Media typeapplication/json

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
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

Skeleton mode has no write side

Media typeapplication/json

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
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}