get_site_prefix_gaps
const url = 'https://example.com/api/v1/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/prefix-gaps \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”For every site holding a device this caller may see, the subnets its devices carry that none of the IP prefixes filed in the site’s folder or beneath it contains, with why each is reported and whether an operator marked it as intentional. A site is the nearest folder of type Site above a device, else the device’s own folder; devices filed in no folder are one site
What Nodes ▸ Missing IP prefixes shows.
object
Gaps listed in sites. Less than gaps_total when the answer was cut at 2,000.
Gaps across every site, marked ones included.
Devices across those sites.
Of those, how many have reported their addresses at all. No gaps is complete only when
this equals nodes_total.
Every site holding a device this caller may see. Most unmarked gaps first, then by name.
One site’s answer.
object
How many of its gaps nobody has marked as intentional. gaps may list fewer when the
answer was cut.
The unmarked gaps first, then the marked ones; inside each, by kind, then subnet - the folder pane’s order. So a cut answer drops marked gaps before unmarked ones.
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.
How many of its gaps were marked as intentional.
Whether the folder is of type Site. A device with no Site folder above it is compared
against its own folder, which is then listed as a site with this false.
The folder’s name; null for the root.
Devices in the site. URL, DNS, Meraki and wireless-AP nodes report no interface addresses and are not counted.
Of those, how many address lists were cut at the per-device cap.
Of those, how many have reported their addresses at all.
The folders above it, outermost first — only those this caller may see. The site’s own
name is given even to a caller scoped below it: naming the folder above yours is the
breadcrumb ADR-014 allows (groups::group_ancestors), and says nothing of what is in it.
IP prefixes filed in the site’s folder or beneath it — only in folders this caller may see.
The site’s folder. null is the root: every device filed in no folder, taken as one site.
Where one site stands - the screen’s four tabs, in their order.
Distinct subnets compared, covered ones included.
Subnets compared, summed over sites — one carried at two sites counts twice.
Example
{ "sites": [ { "gaps": [ { "kind": "unregistered" } ], "status": "gaps" } ]}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" }}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" }}