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
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:
Heya, welcome to the forum. Can you be more specific about what API calls you’re asking about? The post linked above includes a bunch of docs about our public API, as well as instructions for how to query the same endpoints that we do in our UI.
I’m guessing the endpoint that OP found was /dns_zones?account_slug=SLUG, which, you’re right, is not documented so we can’t say with confidence that it won’t change… though the fact that it’s not documented also doesn’t mean that it’ll just change any second. I wish I had something more concrete for you. Getting it documented may be as simple as submitting a PR here (I see there’s an issue there for another endpoint)- I would give that a shot if it’s critical for your app: