Infoblox’s global team of threat hunters uncovers a DNS operation with the ability to bypass traditional security measures and control the Great Firewall of China. Read about “Muddling Meerkat” and the many other threat actors discovered by Infoblox Threat Intel here.

API Examples


API get DHCP lease related info

New Member
Posts: 4
15926     0


     I want use API to obtain DHCP lease ip all related info , need include lease allocation and end time .
I can not found this from API guide , so is this possible ? If yes , what API can help achieve ?


Any help will be appreciated.

Re: API get DHCP lease related info

Posts: 300
15927     0


curl -k1 -u admin:infoblox -X GET ',starts,ends,tstp,binding_state,hardware,uid&_return_as_object=1'

If there's a large number of leases, you will need to request them in pages.  Here's how you request them 10 at a time.  (10 is good for an example, 1000 is more realistic in an automated script...)

curl -k -u admin:infoblox -X GET ',starts,ends,tstp,binding_state,hardware,uid&_paging=1&_return_as_object=1&_max_results=10'

which returns:

    "next_page_id": "789c5...",
    "result": [
    <lots of leases>

For next page, use that next_page_id value in the request:

curl -k -u admin:infoblox -X GET ''

This returns another next_page_id, which goes into the next page request.  repeat until next_page_id is empty, this means all pages have been returned


Re: API get DHCP lease related info

New Member
Posts: 4
15927     0

Dear MRichard,

       Many thank your reply ! You reply is helpful !


        But i am confusing about API return lease Start and End time . I can not match return value with lease real time .


For example :

In my lab , lease  Start time is :2018-07-16 10:35:06 CST ,

and lease End time is :2018-07-16 22:35:06 CST  ;


But API return lease Start and End time is strange number:


<value type="object">
<ends type="int">1531751706</ends>
<starts type="int">1531708506</starts>


Do you know how to match these API return "int number" with lease real time ?





Re: API get DHCP lease related info

Posts: 3
15927     0
Hi King, You can use to convert the epodch to human readable data and time. BR, Simon
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