- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
GET Method to find if an IP exists on infoblox
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2023 12:12 AM
Hi all,
I am tyring to use curl to connect to infoblox, I use GET method to check if the ipaddres exists. The below command i am trying to use and no response from the command. any help highly appreciated.
curl -s -k -o result.json -x GET --user <usernameassword> "https://192.1.1.1/wapi/v2.6/fixedaddress?ipvdaddr=10.10.10.1&_return_as_object=1
I changed the ipaddress search to hostname search
curl -k -s -H 'content: application/json' -x GET --user <usernameassword> "https://192.1.1.1/wapi/v2.6/record:a?name=<fqdn of the server>&_return_as_object=1
is the above syntax is correct as both of them did not help.
Thanks
Raj
Re: GET Method to find if an IP exists on infoblox
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2023 05:39 AM
If there is a network to contain it, the IP address always exists.
I think the more importanty question is: are there any records using the IP address?
Use the "ipv4address" object type, to return the IP address and any objects (records using that IP address.
curl -k1 -u admin:infoblox -X GET 'https://192.1.1.1/wapi/v2.6/ipv4address?ip_address=10.10.10.1&_return_as_object=1'
Re: GET Method to find if an IP exists on infoblox
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2023 03:41 AM - edited 09-07-2023 03:44 AM
Hi Raj,
It seems there are some issues in your curl commands:
- Use -X instead of -x to specify the HTTP request method.
- Remove the extra space before "GET" in the first command.
- Replace placeholders <username>:<password> and <fqdn of the server> with your actual credentials and server information.
You can follow these commands:
For IP address check:
curl -s -k -o result.json -X GET --user <username>:<password> "https://192.1.1.1/wapi/v2.6/fixedaddress?ipv4addr=10.10.10.1&_return_as_object=1"
For hostname check:
curl -k -s -H 'content: application/json' -X GET --user <username>:<password> "https://192.1.1.1/wapi/v2.6/record:a?name=<fqdn of the server>&_return_as_object=1"
For more information, You can check this:
https://docs.devopsinfoblox.com/space/NAG8/22250875
I hope this will help you.
Prisha Singh