-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
NetBox version
v2.10.6
Feature type
Change to existing functionality
Proposed functionality
Currently the /api/dcim/interfaces-endpoint provides a convenient read-only count_ipaddresses field in its return, whereas the /api/virtualization/interfaces-endpoint does not -- although the latter can have IP addresses assigned just like the former and is otherwise very similar in its usage.
I would propose the count_ipaddresses-field to be exposed via the REST API for /api/virtualization/interfaces the same as it is now for /api/dcim/interfaces, for both consistency and utility; if that is not indended, then maybe the count_ipaddresses-field should be deprecated on /api/dcim/interfaces so one does not get bitten by assuming it to be there when using both APIs in similar code.
Use case
Consistency in the API between /api/dcim/interfaces and /api/virtualization/interfaces; personally was surprised when the field was unavailable in one but not the other.
There is utility in the count_ipaddresses field in that it can save unnecessary API calls.
Database changes
No response
External dependencies
No response