-
Notifications
You must be signed in to change notification settings - Fork 91
Fetching a zone in bind config format #39
Comments
FWIW, I added the following to DNSRecords.js: bindConfig: method({
method: 'GET',
path: 'export',
json: false,
}), Allowing me to call: cf.dnsRecords.bindConfig(zone_id); This worked fine. I haven't submitted it as a PR as I suspect you would maybe want to expand "browse" instead, or give the function a different name? I'm happy to submit as a PR, with or without changes. Let me know... |
Additionally, I know this feature isn't in the current set of cloudflare API documentation, but I believe that is an oversight. I have reached out to cloudflare support regarding the issue and they responded:
As another data point, they use this API end-point themselves on their own frontend to allow users to export zones in this format. |
Not heard anything, so submitting as a PR |
In general, I prefer not to add functionality that isn't documented. |
FWIW, I got another response from Cloudflare this morning, to say:
So I don't think we'll have to wait too long. |
This feature is now documented. You can see it at https://api.cloudflare.com/#dns-records-for-a-zone-export-dns-records |
Released in v2.6.0. |
You can fetch a cloudflare zone by calling:
GET zones/$zone_id/dns_records
This is possible with node-cloudflare. However, you can fetch it in bind configuration syntax if you append /export:
GET zones/$zone_id/dns_records/export
This does not appear to be possible with node-cloudflare. Please consider adding this functionality.
The text was updated successfully, but these errors were encountered: