Account Dash Ticket - please wipe DNS records

Hi everyone hope you can help. I have multiple Domains on Cloudflare. since i have migrated my hosting i had to change all my DNS records. There were around 100 or more DNS records per domain. On my main domain i already wiped all records by hand which took forever. Since i dont want to do it 500 times by hand i was wondering if there was a way to wipe all DNS records for one domain? Ive tried to contact Support but just got a Bot answer that support cant help with DNS problems.

Hope anyone knows a solution that works?!

ticket number 2400128 {redacted}

Kind regards

Have you tried to use the API?

Here is an example script to search for all A records with a particular target, and change them to a new target IP address.

auth_email="[email protected]"

record_list=( $(curl -s -X GET "${zone_id}/dns_records?per_page=500&type=A&content=" -H "X-Auth-Email: $auth_email" -H "X-Auth-Key: $auth_key" -H "Content-Type: application/json" | jq -r '.result[].id') )

for id in "${record_list[@]}"
	curl -s -X PATCH "${zone_id}/dns_records/${id}" -H "X-Auth-Email: $auth_email" -H "X-Auth-Key: $auth_key" -H "Content-Type: application/json" --data '{"content":""}'

Sorry but i dont understand ANYTHING of what you just wrote?!
can you point me to a totorial or give a more in depth explenation?

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