Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

NetBox

Direct answer

NetBox is an open-source source of truth for networks and data centres, modelling sites, racks, devices, interfaces, cables, IP addresses, VLANs and circuits, with a REST and GraphQL API for automation.

When to use this

Use this when using NetBox as the source of truth for network and data centre automation.

First 30 seconds

1. NetBox: network source of truth (DCIM + IPAM + more).

2. REST/GraphQL APIs, webhooks, custom fields.

3. Drives inventory and config generation.

4. Data quality matters.

5. Back up PostgreSQL and media.

Operational verification

NetBox data → API/webhooks → automation

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
NetBox source-of-truth automation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformNetBox source-of-truth automation · Automation implementations are tool and platform specific. Use the adjacent Domain for the technology being automated and this Domain for automation behavior.
Scope / prerequisiteUse this when using NetBox as the source of truth for network and data centre automation.
What next?3 suggested next steps
Child topics (this level)15
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

3 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification path Verify boundary

The negative fixture should deliberately exercise risks such as duplicate labels, stale inventory, conflicting authority, broad filters, race between read and write, orphaned relationships and automation acting on data not yet reconciled, choosing the cases most relevant to NetBox as a source-of-truth application with stable object IDs, API/schema/version awareness, change logging and downstream reconciliation.

Step 2 Example Narrow the fault
curl -H "Authorization: Token $NB_TOKEN" https://netbox.example.com/api/status/
Step 3 Common mistakes Narrow the fault
  • Using NetBox as documentation only and never as automation input.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Drill down

Subtopics

Go one level deeper into this subject.

Subtopic NetBox Fundamentals

NetBox fundamentals: it models what the network should look like — sites, racks, devices, cables, IPs, VLANs and circuits — as the source of truth for documentation and automation.

Subtopic Sites

Sites in NetBox are physical locations such as offices or data centres, grouped into regions and site groups, containing locations, racks and devices.

Subtopic Devices

Devices in NetBox represent physical or virtual network hardware with site, rack position, role, platform, device type and status, and are the anchor for interfaces and IP addresses.

Subtopic Interfaces

Interfaces in NetBox are device ports with type, speed, mode (access or tagged), VLANs, cable connections and IP addresses, used to generate switch and router configurations.

Subtopic IPAM

NetBox IPAM manages aggregates, prefixes, IP ranges, addresses, VLANs and VRFs, with utilization and next-available allocation through the API.

Subtopic Prefixes

Prefixes in NetBox are subnets with VRF, site, VLAN, role and status, nested hierarchically, showing utilization and offering available child prefixes and IPs via the API.

Subtopic IP Addresses

IP addresses in NetBox are individual addresses with mask, status, role, DNS name and assignment to an interface, which automation can allocate and use to build configs.

Subtopic VLANs

VLANs in NetBox have VID, name, status and scope by site or VLAN group, and are assigned to interfaces and prefixes so switch configuration can be generated from them.

Subtopic VRFs

VRFs in NetBox model separate routing tables with route distinguishers and route targets, allowing overlapping prefixes and IP addresses to be tracked correctly.

Subtopic Circuits

Circuits in NetBox model WAN and internet links from providers, with circuit ID, type, commit rate and terminations at sites or devices, useful for tracking carriers and contracts.

Subtopic Virtualization

NetBox virtualization models clusters, virtual machines and their interfaces and IP addresses, so VMs are documented alongside physical devices.

Subtopic Custom Fields

Custom fields add your own attributes to NetBox objects, such as a support contract or backup policy, which automation can read and write through the API.

Subtopic REST API

The NetBox REST API at /api/ exposes every object for create, read, update and delete with token authentication, filtering and pagination; pynetbox wraps it for Python.

Subtopic Webhooks

NetBox webhooks send an HTTP request when objects are created, updated or deleted, triggering automation such as pushing a config or updating DNS when data changes.

Subtopic NetBox Automation

NetBox automation reads intended network state from NetBox via pynetbox, the REST API or Ansible's netbox inventory plugin, and pushes changes back, keeping NetBox the source of truth.

Key points
  • Model intent in NetBox before configuring devices.
  • Use the API or pynetbox for automation.
  • Webhooks can trigger automation on changes.
Key checks
  • curl -s -H 'Authorization: Token <t>' https://<netbox>/api/status/ — version and plugins
  • Data model coverage (sites, devices, IPAM, circuits) — usage
  • Backups of NetBox DB and media — recovery
ReferenceWhy it matters1 section · depth on demand

What it is

NetBox is an open-source source of truth for DCIM and IPAM: sites, racks, devices, cables, prefixes, IPs, VLANs and VRFs, with a REST and GraphQL API.

ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

NetBox is the most widely used open-source source of truth for networks. It models the physical and logical infrastructure — sites, racks, devices, interfaces, cables, IP space, VLANs, VRFs, circuits — and provides REST and GraphQL APIs, webhooks, custom fields, config contexts and plugins.

How it fits into automation:

RoleExample
InventoryAnsible dynamic inventory from NetBox
IntentTemplates rendered from device/interface/VLAN data
AllocationNext free IP/prefix via API
TriggerWebhooks on changes start automation
ValidationCompare live state with NetBox

Key tools: pynetbox (Python), netbox.netbox Ansible collection, Terraform provider, and plugins such as NetBox Branching for staged changes. Plan data ownership and quality processes before importing everything.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docNetBox source-of-truth automation current

Authoritative/upstream documentation reviewed for bounded claims in NetBox. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://netbox.readthedocs.io/en/stable/ · confidence 94%
Depth when you need it

Deep reference

Healthy vs suspicious evidence

Output interpretation

For NetBox as a source-of-truth application with stable object IDs, API/schema/version awareness, change logging and downstream reconciliation, prefer typed fields and stable IDs over human presentation text.

Confirmation

Confirm action

Continue?