WAPI: Obtaining next available IP(s) from a non /24 network

JamieGarofalo
edited June 6 in Automation

We have a few networks defined in IB that are /21 or /23 and I'm unable to find the correct combination of WAPI objects/options to get the list of available (UNUSED) IPs. Is this even possible?


Example network is 10.199.0.0/21 and I'd like to get available IPs on 10.199.7.0.

Please help.

Thank you

Tagged:

Comments

  • BrianAlaimo
    edited June 9

    You can search using the ipvaddress object, where status equals 'UNUSED'. Something like this:

    curl -k1 -u admin:infoblox -X GET 'https://192.168.240.15/wapi/v2.13.1/ipv4address?status=UNUSED&network=10.0.0.0/21&_max_results=2046'

  • That certainly works. Thank you so much.