Netlify API is not fetching all DNS records of site

I am using the Netlify API Javascript client to get the DNS configuration of my site. My site uses Netlify managed DNS and there are 5 records in the DNS dashboard. When I make the API call using client.getDNSForSite({ site_id }) only 2 DNS records are returned in the result.

Is this a bug in Netlify, or am I doing something wrong?

Which site is it that your api call refers to? Seems likely that you only have 2 hostnames set on it :slight_smile:

The call you are making is to fetch site settings, which probably doesn’t have a 1:1 mapping with the DNS Zone you mention seeing in our UI. If you want to make the call that shows your DNS records, try finding the call we use. It may not be directly supported in the client you’re using right now since we don’t necessarily support all possible calls there, and so you may have to make it directly (which is fine with us, may be harder for you, but not against the rules :)), after you find it using this methodology:

I checked and the Netlify dashboard invokes a different API call which isn’t in client like you mentioned. Thanks for pointing it out. Cheers!