Use this when modelling devices in NetBox.
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.
1. Devices with role, type, platform, site, status, primary IP.
2. Platform maps to automation drivers.
3. Primary IP for management.
4. Status drives inclusion.
5. Serial/asset tags.
device record → inventory/config generation
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
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 stable device object identity, role/site/tenant/platform fields, interface relationships and using IDs rather than mutable names in automation.
Step 2 Common mistakes Narrow the fault
- Creating devices without device types (interfaces missing).
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.
- Devices have site, rack, role, platform, type and status.
- They anchor interfaces and IP addresses.
- Keep status accurate (planned, active, decommissioning).
curl -s -H 'Authorization: Token <t>' 'https://<netbox>/api/dcim/devices/?site=<site>&status=active' | jq '.count'— active devices- Device role, type, platform — automation fields
- Primary IP set — management access
ReferenceWhy it matters1 section · depth on demand
What it is
Devices have a type, role, platform and site; interfaces come from the device type template.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
Devices in NetBox are the physical or virtual network equipment: switches, routers, firewalls, servers. Each device has a device type (model), role, platform, site, status and optional primary IP — the attributes automation uses to decide how to connect and what configuration to generate.
| Field | Automation use |
|---|---|
| Role | Selects template (access switch, core router) |
| Platform | Selects driver/OS (cisco_ios, junos) |
| Primary IPv4 | Connection address |
| Status | Only automate active devices |
| Config context / custom fields | Extra variables |
| Tags | Grouping and feature flags |
curl -s -H "Authorization: Token $NB_TOKEN" \
'https://netbox.example.com/api/dcim/devices/?role=access-switch&status=active&site=oslo' \
| jq '.results[] | {name, ip: .primary_ip4.address}'
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in NetBox > Devices. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://netbox.readthedocs.io/en/stable/ · confidence 94%Deep reference
Healthy vs suspicious evidence
Output interpretation
For stable device object identity, role/site/tenant/platform fields, interface relationships and using IDs rather than mutable names in automation, prefer typed fields and stable IDs over human presentation text.