REST API: dcim/interfaces has count_ipaddresses, while virtualization/interfaces does not #6070
Labels
status: accepted
This issue has been accepted for implementation
type: bug
A confirmed report of unexpected behavior in the application
NetBox version
v2.10.6
Feature type
Change to existing functionality
Proposed functionality
Currently the
/api/dcim/interfaces
-endpoint provides a convenient read-onlycount_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 thecount_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
The text was updated successfully, but these errors were encountered: