Include region field in /api/dcim/devices/ response #265

Closed
opened 2026-04-05 16:23:56 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @jorgenspange on 3/2/2026

NetBox version

v4.5.3

Feature type

Data model extension

Proposed functionality

The /api/dcim/devices/ endpoint does not include region in the device response payload.

A device is linked to a site, and site is linked to a region, but the region information is not exposed in the device object itself.

Use case

When consuming /api/dcim/devices/ for automation (e.g. Ansible, Terraform, reporting), region is frequently required for both innventory grouping and configuration scoping

Currently this requires:

  • Fetch devices
  • Extract site IDs
  • Query /api/dcim/sites/
  • Build a site to region mapping

Including region in the device payload would drastically simplify this.

Database changes

No response

External dependencies

No response

*Originally created by @jorgenspange on 3/2/2026* ### NetBox version v4.5.3 ### Feature type Data model extension ### Proposed functionality The /api/dcim/devices/ endpoint does not include region in the device response payload. A device is linked to a site, and site is linked to a region, but the region information is not exposed in the device object itself. ### Use case When consuming /api/dcim/devices/ for automation (e.g. Ansible, Terraform, reporting), region is frequently required for both innventory grouping and configuration scoping Currently this requires: - Fetch devices - Extract site IDs - Query /api/dcim/sites/ - Build a site to region mapping Including region in the device payload would drastically simplify this. ### Database changes _No response_ ### External dependencies _No response_
Sign in to join this conversation.
No Label netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox netbox type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature type: feature
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#265