Virtual machine primary IPs are not nested in the API serializer #1395

Closed
opened 2025-12-29 16:32:00 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Nov 9, 2017).

Issue type

[ ] Feature request
[x] Bug report
[ ] Documentation

Environment

  • Python version: 3.5.2
  • NetBox version: 2.2.4

Description

This issue was initially raised by Thomas W. on the mailing list.

When retrieving a device via the API, its primary_ip4 and primary_ip6 fields are extended to include nested representations of and links to their respective IP addresses (if assigned). However, the virtual machine serializer includes only the numeric primary key of the IP address.

Additionally, the primary_ip field, which replicates either the primary_ip4 or primary_ip field depending on how NetBox is configured, is absent.

Originally created by @jeremystretch on GitHub (Nov 9, 2017). ### Issue type [ ] Feature request <!-- An enhancement of existing functionality --> [x] Bug report <!-- Unexpected or erroneous behavior --> [ ] Documentation <!-- A modification to the documentation --> ### Environment * Python version: 3.5.2 * NetBox version: 2.2.4 ### Description This issue was initially raised by Thomas W. [on the mailing list](https://groups.google.com/forum/#!topic/netbox-discuss/hlp2dLNw9ug). When retrieving a device via the API, its `primary_ip4` and `primary_ip6` fields are extended to include nested representations of and links to their respective IP addresses (if assigned). However, the virtual machine serializer includes only the numeric primary key of the IP address. Additionally, the `primary_ip` field, which replicates either the `primary_ip4` or `primary_ip` field depending on how NetBox is configured, is absent.
adam added the type: bug label 2025-12-29 16:32:00 +01:00
adam closed this issue 2025-12-29 16:32:00 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1395