Creating Cloudflare account via API v1 won't scan DNS records

Hi,

we are using API v1 to create CF account for customers, lately when adding domains it is added correctly and we can add / remove / edit DNS records trought API but for some reason no existing DNS records from another DNS service is scanned at all. This means that we need to manually add every single DNS record, including root A record.

API is build using this Cloudflare Hosting Provider API | Cloudflare | The web performance & security company manual.

Cloudflare won’t support that any longer. You should really switch to the current version at api.cloudflare.com.

The request in question is at Cloudflare API v4 Documentation and jump_start needs to be true.

Edited it to use API v4

curl -s -X POST "https://api.cloudflare.com/client/v4/zones" \
     -H "X-Auth-Email: $email" \
     -H "X-Auth-Key: $userapikey" \
     -H "Content-Type: application/json" \
     --data '{"name":"'"$domain"'","account":{"id":"'"$userid"'"},"jump_start":true,"type":"full"}'

Domain is added correctly but still it wont scan for existing DNS records. How ever, calling
curl -s -X POST "https://api.cloudflare.com/client/v4/zones/$zoneid/dns_records/scan" \ -H "X-Auth-Email: $email" \ -H "X-Auth-Key: $userapikey" \ -H "Content-Type: application/json"
will scan for records. Am I missing something?

That’s interesting, I seem to be able to reproduce that. Interesting in particular, because /dns_records/scan is not even documented.

But, it would appear as if this were a feature, not a bug :wink:Create a Zone - Jump Start.

My guess, Cloudflare is about to deprecate jump_start and switch to /dns_records/scan but has not updated the documentation yet.

For your case, I’d set jump_start to false and then run an additional scan request.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.