chore: delete old files from cloudflare
This commit is contained in:
parent
1b03d83ff2
commit
2fb369309e
3 changed files with 0 additions and 22 deletions
|
@ -1,22 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
TOKEN=""
|
||||
ZONE_ID=
|
||||
|
||||
# EMAIL=me@gmail.com
|
||||
# KEY=11111111111111111111111111
|
||||
# Replace with
|
||||
# -H "X-Auth-Email: ${EMAIL}" \
|
||||
# -H "X-Auth-Key: ${KEY}" \
|
||||
# for old API keys
|
||||
|
||||
|
||||
curl -s -X GET https://api.cloudflare.com/client/v4/zones/${ZONE_ID}/dns_records?per_page=500 \
|
||||
-H "Authorization: Bearer ${TOKEN}" \
|
||||
-H "Content-Type: application/json" | jq .result[].id | tr -d '"' | (
|
||||
while read id; do
|
||||
curl -s -X DELETE https://api.cloudflare.com/client/v4/zones/${ZONE_ID}/dns_records/${id} \
|
||||
-H "Authorization: Bearer ${TOKEN}" \
|
||||
-H "Content-Type: application/json"
|
||||
done
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue