preview_discovery_import
const url = 'https://example.com/api/v1/discovery/import-preview';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"addresses":["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/import-preview \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "addresses": [ "example" ] }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Body for the import preview: the candidate addresses about to be imported.
object
Examplegenerated
{ "addresses": [ "example" ]}Responses
Section titled “Responses”Which folder’s IP range would claim each address
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
One address claimed equally well by two or more folders. Never resolved automatically.
object
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.
One address, and the single folder whose IP range contains it.
object
The range that matched — shown so the operator can see why this folder is proposed.
Addresses that fall inside no visible folder’s range.
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
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
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" }}