Dns record limitation and returned error format

As far as I know, there are limits of dns record’s number. My question is:

  1. Is there an api to retrieve the current total number of dns record of a zone?
  2. What is the error format will be returned when I create a new dns record and it exceeds the limitation?

Thanks

As far as I am aware there is nothing that returns the raw number. You’d have to fetch the records and count them
https://api.Cloudflare.com/#dns-records-for-a-zone-list-dns-records

As for the error, I’d expect success to be false and an appropriate value in errors and messages.
https://api.Cloudflare.com/#dns-records-for-a-zone-create-dns-record

If you need to know the exact codes, it is probably best to open a support ticket.

1 Like