WAPI query to DHCP leased hostname

Posts: 5
4526     0

Hi all,


I am playing around with the WAPI and I was trying to get the following scenario:


for my low environments I want to assign IPs by DHCP so I don't have to worry about giving any specific IP, but I would like to find through a python script and WAPI the IP that it was assigned by looking for a hostname that would be the argument. 


while I saw this possibility when having host records (DNS) I haven't found any way to do it with DHCP leased  hosts. Also, another question would be how could those leased hosts be converted into host records and whether it makes sense. 


thanks a lot!


Re: WAPI query to DHCP leased hostname

[ Edited ]
Posts: 82
4527     0

Hi Ramon,


1) Get the lease by client hostname:




"_ref": "lease/ZG5zLmxlYXNlJDAvMTAuMTI4LjMzLjExLzAv:",
"binding_state": "FREE",
"client_hostname": "Air-de-Nicolas",
"hardware": "a8:20:66:01:c9:3c"


2) Creating a host

it allow to always return the same IP address.


raw body:








Capture d’écran 2017-07-06 à 13.14.57.png





Check out our new Tech docs website at for latest documentation on Infoblox products.

Re: WAPI query to DHCP leased hostname

Posts: 5
4527     0

that worked for me, thanks Nicolas!

Showing results for 
Search instead for 
Did you mean: 

Recommended for You

Businesses are investing heavily into securing company resources from cyber-attacks form cybercrimin