Are you interested in our Early Access Program (EAP)? This program allows you to preview code, test in your lab and provide feedback prior to General Availability (GA) release of all Infoblox products. If so, please click the link here.

API & Integration, DevOps,NetOps,SecOps


Reclaim an IP with API

Posts: 2
1352     0



I've been trying to nail down an API call that will function similarly to the 'reclaim' button in the UI itself.


I need it to remove the IP, plus any DNS records associated with it.  A records, CNAMEs, everything, as part of a server decomissioning process.


This is the call I think will work:

DELETE  - https://[infoblox server]/wapi/v2.4/ipv4address?ip_address=[IP]


I'd like to check that this is not going to delete the network it is within also, as it is listed in the body of a get request to the same URL.


Any guidance here would be appreciated.





Re: Reclaim an IP with API

Posts: 195
1353     0

Yes sounds like that will work for your needs.  Recliaming the IP will delete any DNS records or DHCP objects from that IP address.  It will not remove or expire DHCP leases. 


You'll need to obtain the _ref for the IP address, and then run the DELETE against the reference.


you can do it in one action with a multibody request:



    "data": {"ip_address": ""},
    "assign_state": {"ipaddr_ref": "_ref" },
    "enable_substitution": true,
    "discard": true
    "object": "##STATE:ipaddr_ref:##",
    "enable_substitution": true




Re: Reclaim an IP with API

Posts: 2
1353     0

Thanks, that's really helpful.


I'm relatively new to APIs in general so I haven't seen multibody requests before.


It processes the GET first, then populates the DELETE object field afterwards with the ipaddr_ref result?



Showing results for 
Search instead for 
Did you mean: 

Recommended for You