Skip to content

preview_discovery_import

POST
/api/v1/discovery/import-preview
curl --request POST \
--url https://example.com/api/v1/discovery/import-preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "addresses": [ "example" ] }'
Media typeapplication/json

Body for the import preview: the candidate addresses about to be imported.

object
addresses
required
Array<string>
Examplegenerated
{
"addresses": [
"example"
]
}

Which folder’s IP range would claim each address

Media typeapplication/json

Where each candidate would be filed. A proposal, not an action — nothing is written by the endpoint that returns this (ADR-131 decision 7, the same posture as ADR-124 decision 6).

object
ambiguous
required
Array<object>

One address claimed equally well by two or more folders. Never resolved automatically.

object
address
required
string
group_ids
required
Array<string>
any_prefixes
required

Whether any folder this caller can see carries a range at all.

Without this, a deployment with no ranges reports every address as unmatched and the operator cannot tell “these addresses are not covered” from “there was never anything to match against” — one message for two situations is how an inert feature looks like a working one.

boolean
matched
required
Array<object>

One address, and the single folder whose IP range contains it.

object
address
required
string
group_id
required
string format: uuid
prefix
required

The range that matched — shown so the operator can see why this folder is proposed.

string
unmatched
required

Addresses that fall inside no visible folder’s range.

Array<string>
Examplegenerated
{
"ambiguous": [
{
"address": "example",
"group_ids": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
]
}
],
"any_prefixes": true,
"matched": [
{
"address": "example",
"group_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"prefix": "example"
}
],
"unmatched": [
"example"
]
}

An unparseable address, or more than one request may carry

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 lacks ManageConfig

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"
}
}