Learn How We Can Help You Keep Teleworkers Protected During the COVID-19 Crisis

API & Integration

Reply
Highlighted

WAPI to get all free IPs in a subnet

Techie
Posts: 1
943     0

We need WAPI to get all the free IPs from IPAM for a particular subnet in one shot. As per document we can see there is a command for "ipv4addr": "func:nextavailableip. But is there any API which can give all IPs in one shot

Highlighted

Re: WAPI to get all free IPs in a subnet

Adviser
Posts: 40
943     0

Using the ipv4address object and searching on the Infoblox network and status=UNUSED will give you the list of available IPs for that subnet.

 

E.g.

 

curl -k1 -u testuser -X GET 'https://10.10.100.51/wapi/v1.4/ipv4address?network=10.10.10.0/24&status=UNUSED'

Highlighted

Re: WAPI to get all free IPs in a subnet

Authority
Posts: 15
943     0

This will exclude any free LEASES as part of a DHCP range within the subnet.  Can use "lease_state" for that with status FREE

Highlighted

Re: WAPI to get all free IPs in a subnet

Authority
Posts: 32
943     0

Hi JVoss,

 

I have a question on similar lines. In the below code as suggested by you, if i change the status to USED or to an extrensible attribute value as status=blocked, will the api give me used ip address and blocked ip address respectively ??

Showing results for 
Search instead for 
Do you mean 

Recommended for You