get_prefix_gaps
const url = 'https://example.com/api/v1/node-groups/example/prefix-gaps';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/v1/node-groups/example/prefix-gaps \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Folder id
Responses
Section titled “Responses”The subnets this folder’s devices (and those of every folder beneath it) carry that none of those folders’ IP ranges contains, with why each is reported
The answer for one folder.
object
Ordered by kind, then subnet.
One subnet a folder’s devices carry that its own ranges do not cover.
object
Why a subnet is reported. Ordered by how directly it names something to fix in NetBox.
How many distinct devices carry an address in this subnet.
The range that contains it (parent_only, other_folder) or lies inside it (partial).
null for unregistered, and when that range belongs to a folder this caller may not
see — a folder’s subnet layout is not disclosed past its scope (ADR-014, ADR-100 decision 10).
The folder range belongs to, under the same rule.
That folder’s name, under the same rule.
Up to [SEEN_ON_MAX] of the places it was seen, ordered by device then port.
One place a subnet was seen: a device, the port it is configured on, and the address itself.
object
The port’s name when the interface inventory has one. Filled by the caller.
The subnet, as network/length.
Devices filed in the folder or beneath it.
Of those, how many address lists were cut at the per-device cap.
Of those, how many have reported their addresses at all. A device with no SNMP, or whose
address walk has never succeeded, contributes nothing — so no gaps is not the same as
complete unless this equals nodes_total.
Distinct subnets compared, covered ones included.
Example
{ "gaps": [ { "kind": "unregistered" } ]}too_many_nodes: the folder and its subfolders hold more devices than one report reads; open a folder further down
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 the View permission
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 such folder, or not one this caller may see
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" }}This core has no write side (skeleton mode)
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" }}