- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
How to get Unused IP Addresses from a DHCP Range via API
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2019 05:41 AM - edited 08-20-2019 05:46 AM
Hello All,
We are using 8.2.x version for our grid. We want to review the unused ip addresses in a dhcp range via wapi or api instead of ipam networks. However, when we try getting unused ip address NIOS provides us the unused available ip address in ipam. But, as mentioned above, we want to get unused ip addresses from a dhcp range. Could someone kindly support me about it.
Thank you in advance.
Re: How to get Unused IP Addresses from a DHCP Range via API
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2019 09:15 AM - edited 08-21-2019 05:35 PM
Hi,
https://master.example.com/wapi/v2.7/ipv4address?_max_results=10000&network=1.1.1.0/24&_return_fields=ip_address,lease_state,mac_address,status
You would want to look for (lease_state) from the above. Active leases should come up as 'ACTIVE'.
'status', may still return the state based on IPAM.
Best Regards,
Bibin Thomas