- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
GET request for retrieving A records within a network range
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2024 08:31 AM
Hello, I am looking for an API call that will return all of the A records and Host records within a network range. The goal is to retrieve all of the records within a Network. For example, if we already have the 10.10.10.0/24 network built in Infoblox, and we have 100 records within that network, I am looking to use a GET to retrieve all of those records. I am unable to find a request that would perform this within the wapidoc
Thank you
Re: GET request for retrieving A records within a network range
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2024 08:34 AM
Generally A & HOST records are owned by the zone they belong to, not the network. But you can take the IPAM approach, and search for any USED IP addresses, which will return any objects assocated with those IP addresses.
This request:
curl -k -u admin:infoblox -H "Content-Type: application/json" \ -X POST 'https://192.168.1.2/wapi/v2.12/request' -d \ '[{ "method":"GET", "object":"ipv4address", "data": { "network": "192.168.9.0/24", "network_view": "default", "status": "USED" } }]'
Will return lots of IP address entries, including any associated DNS records:
{ "_ref": "ipv4address/Li5pcHY0X2FkZHJlc3MkMTkyLjE2OC45LjIxNi8w:192.168.9.216", "ip_address": "192.168.9.216", "is_conflict": true, "mac_address": "", "names": [ "printer.example.org" ], "network": "192.168.9.0/24", "network_view": "default", "objects": [ "record:a/ZG5zLmJpbmRfYSQuX2RlZmF1bHQubmV0d29yay5yaWNoYXJkLHJwdCwxOTIuMTY4LjkuMjE2:printer.example.org/Internal%20DNS", "record:ptr/ZG5zLmJpbmRfcHRyJC5fZGVmYXVsdC5hcnBhLmluLWFkZHIuMTkyLjE2OC45LjIxNi5ycHQucmljaGFyZC5uZXR3b3Jr:216.9.168.192.in-addr.arpa/Internal%20DNS" ], "status": "USED", "types": [ "A", "PTR" ], "usage": [ "DNS" ] }