コンテンツにスキップ

get_prefix_gaps

GET
/api/v1/node-groups/{id}/prefix-gaps
curl --request GET \
--url https://example.com/api/v1/node-groups/example/prefix-gaps \
--header 'Authorization: Bearer <token>'
id
required
string

Folder id

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

Media typeapplication/json

The answer for one folder.

object
gaps
required

Ordered by kind, then subnet.

Array<object>

One subnet a folder’s devices carry that its own ranges do not cover.

object
intentional
One of:
null
kind
required

Why a subnet is reported. Ordered by how directly it names something to fix in NetBox.

string
Allowed values: unregistered partial other_folder parent_only
node_count
required

How many distinct devices carry an address in this subnet.

integer format: int32
range

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).

string | null
range_group

The folder range belongs to, under the same rule.

string | null format: uuid
range_group_name

That folder’s name, under the same rule.

string | null
seen_on
required

Up to [SEEN_ON_MAX] of the places it was seen, ordered by device then port.

Array<object>

One place a subnet was seen: a device, the port it is configured on, and the address itself.

object
if_name

The port’s name when the interface inventory has one. Filled by the caller.

string | null
ifindex
required
integer format: int32
ip
required
string
node_id
required
string format: uuid
subnet
required

The subnet, as network/length.

string
group_id
required
string format: uuid
nodes_total
required

Devices filed in the folder or beneath it.

integer format: int32
nodes_truncated
required

Of those, how many address lists were cut at the per-device cap.

integer format: int32
nodes_with_addresses
required

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.

integer format: int32
subnets_checked
required

Distinct subnets compared, covered ones included.

integer format: int32
Example
{
"gaps": [
{
"kind": "unregistered"
}
]
}

too_many_nodes: the folder and its subfolders hold more devices than one report reads; open a folder further down

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 the View permission

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 such folder, or not one this caller may see

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

This core has no write side (skeleton mode)

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