bash script to update all dns records on cloudflare zone if hetrixtools api return offline

Hi, I need to know if is possible to update all dns records on a domain (A, AAAA) using cloudflare api or i need to write every dns record manually.

I want to check if "X" server status goes offline using hetrixtools api and change all A and AAAA entries with new ipv4/v6

I managed to make this work https://gist.github.com/Tras2/cba88201b17d765ec065ccbedfb16d9a with a single A record but don't know how to make it to do massively on all existing dns records and i have like 20 which i need to include

appreacited if someone can guide me or share a example

Comments

Sign In or Register to comment.