for domain in $(cat domains.txt); do \ curl -X POST -H “X-Auth-Key: myAccessKey” -H “X-Auth-Email: myEmail”\ -H “Content-Type: application/json” \ “https://api.cloudflare.com/client/v4/zones” \ – data ‘{account": {“id”: “myAccountId”}, “name”:"’$domain’",“jump_start”:true}’;done
So I need to understand whow curl will know what is “domain” (it supposed to be each single line of the file). And there are also few things I’m not sure about. 1st - I’ve generated Access Key with
Permissions Zone - DNS - Read and I’m not sure if it’s correct as I need to delete any existing records for domains and put own A record. 2nd - Where I should find my Account id? Not sure if I choose the right one.
for domain in $(cat domains.txt); do \ curl -X POST -H “X-Auth-Key: myAccessKey” -H “X-Auth-Email: myEmail”\ -H “Content-Type: application/json” \ “https://api.cloudflare.com/client/v4/zones” \ – data ‘{account": {“id”: “myAccountId”}, “name”:"’$domain’",“jump_start”:true}’;done
So I need to understand whow curl will know what is “domain” (it supposed to be each single line of the file). And there are also few things I’m not sure about. 1st - I’ve generated Access Key with
Permissions Zone - DNS - Read and I’m not sure if it’s correct as I need to delete any existing records for domains and put own A record. 2nd - Where I should find my Account id? Not sure if I choose the right one.