THE GAME HAS CHANGED

Introducing Infoblox Universal DDI ManagementTM

Watch the launch to discover the new era of management for critical network services. Watch Now

API & Integration, DevOps,NetOps,SecOps

Reply

Please advise (Newbie): API request to get an IP

Authority
Posts: 29
3270     0

Hi Team,

 

 

I am a newbie to the Infoblox API/WAPI.

 

lets say i want to know about the IP 10.10.0.0 in network 10.10.0.0/24. Infoblox address is 172.20.255.192 ( using just for example). network view name=AIAutomation.

 

Is my below API request correct? 
 
 
 

Re: Please advise (Newbie): API request to get an IP

Adviser
Posts: 181
3271     0

Hi,

 

Your API does look correct to me.

 

Here is a sample response:

curl -k -u admin:infoblox -X GET "https://127.0.0.1/wap/v2.10/search?address=192.168.0.0&_return_as_object=1"

{
    "result": [
        {
            "_ref": "networkcontainer/ZG5zLm5ldHdvcmtfY29udGFpbmVyJDE5Mi4xNjguMC4wLzE2LzA:192.168.0.0/16/default",
            "network": "192.168.0.0/16",
            "network_view": "default"
        },
        {
            "_ref": "network/ZG5zLm5ldHdvcmskMTkyLjE2OC4wLjAvMjQvMA:192.168.0.0/24/default",
            "network": "192.168.0.0/24",
            "network_view": "default"
        }
    ]
}

Re: Please advise (Newbie): API request to get an IP

Authority
Posts: 29
3271     0

Hi Kvasudevan,

 

Thanks for your reply. The thing is when I am writing the curl command on my command prompt in windows it throws me the error

 

curl -k -u admin:infoblox -x POST https://172.20.165.192/wapi/v2.4/network/ZG5zLm5ldHdvcmskMTAuMTAuMC4wLzI0LzE:10.10.0.0/24/AI%20Autom...


curl: (7) Failed to connect to POST port 1080: Timed out
'_return_as_object' is not recognized as an internal or external command,
operable program or batch file.
'num' is not recognized as an internal or external command,
operable program or batch file.

 

Can you help me in resolving this issue??

Re: Please advise (Newbie): API request to get an IP

Adviser
Posts: 181
3271     0

Hi Ashley,

 

Your API should like below:

curl -k -u admin:infoblox -H 'content-type: application/json' -X POST "https://127.0.0.1/wapi/v2.10/network/ZG5zLm5ldHdvcmskMTcyLjIxLjEwLjAvMjQvMA:172.21.10.0/24/default?_function=next_available_ip&_return_as_object=1" -d '{"num":5}'

This guide covers a lot of common use cases.

 

Regards,

Krishna

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