Add the prefix utilization to the API. The utilization is a useful information for people who use the Netbox API for their own automation.
The code to add is simple as the models.py for IPAM has already the required function used by the Web UI.
The manner in which prefix utilization is currently calculated is too inefficient to include by default in REST API responses. Marking this as blocked by #7845, which, if implemented, should make this feasible.
NetBox version
v3.2.6
Feature type
New functionality
Proposed functionality
Add the prefix utilization to the API. The utilization is a useful information for people who use the Netbox API for their own automation. The code to add is simple as the models.py for IPAM has already the required function used by the Web UI.
Code to add to the prefix serializer:
I am happy to make the changes and create a pull request if the feature is accepted.
Use case
API users get the utilization of a prefix in a percentage value. That would be helpful to create reports or get an overview about IP usage.
Database changes
NA
External dependencies
NA