- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Please advise (Newbie): API request to get an IP
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2019 02:08 PM
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.
Re: Please advise (Newbie): API request to get an IP
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2019 10:35 PM
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2019 08:05 AM
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2019 08:10 AM
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