- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
API call to delete network with all addresses including DNS.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2024 07:27 AM
I require an API call to delete a network, like a /30, and delete the IP addresses within it whether they are DHCP or DNS. I know that deleting the network automatically deletes usage of DHCP but not aware if this can be done for DNS?
curl -k -u usernameassword -H 'content-type: application/json' -X DELETE "https://infoblox/wapi/v2.12/network/record:a"
Using a command like the above does not delete the DNS, can this be done?
Re: API call to delete network with all addresses including DNS.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2024 01:47 PM
DNS records are parented by a zone, not by a network. If you want to delete all the records within a network, you will need to traverse the network to get them all first.
For example, this search will give you a reference to each DNS name associcated with a record in the network. But note, associated CNAMEs, SRVs, TXTs, or other types of records without an IP address associated, will not not be in this list and therefore would not get deleted.
curl -k1 -u admin:infoblox -X GET 'https://192.168.1.2/wapi/v2.12/ipv4address?network=192.168.1.0/24&usage=DNS'