Filter no dns zones


#1

Hi,
how can I have the list of zones having no dns? using the API or other method without the need for checking them one by one.
when adding a site, for some sites the dns can not be scanned and so the dns record are empty with no dns.
Also how can I find the no dns zones and edit the dns records and create required dns records?


#2

How do you define “no DNS”? No records at all?

I dont think there is a straightforward call. You’d first get your zones and then for each its records. If it doesnt return any you’d have found such a zone.


#3

Yes, no records at all.
Can you explain your method more?


#4

You make a call to get all zones, then iterate through them and make calls to get each respective’s DNS records. If the response does not contain records you can count that zone as “no DNS”.


#5

Thanks. for doing the second part of your method (make calls to get each respective’s DNS) is it necessary to have the id of each zone? or only the list of domains with no DNS record is enough?


#6

As there is no way to get a list of IDs without records (in which case you wouldnt need to query for the records either) you’ll have to do that for all zones.