We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 235e0c7 commit 4a9926dCopy full SHA for 4a9926d
Y
@@ -0,0 +1,22 @@
1
+#!/bin/bash
2
+
3
+TOKEN="xxxxxxxxxxxxxxxxxxx"
4
+ZONE_ID=2222222222222222222222222
5
6
+# [email protected]
7
+# KEY=11111111111111111111111111
8
+# Replace with
9
+# -H "X-Auth-Email: ${EMAIL}" \
10
+# -H "X-Auth-Key: ${KEY}" \
11
+# for old API keys
12
13
14
+curl -s -X GET https://api.cloudflare.com/client/v4/zones/${ZONE_ID}/dns_records?per_page=500 \
15
+ -H "Authorization: Bearer ${TOKEN}" \
16
+ -H "Content-Type: application/json" | jq .result[].id | tr -d '"' | (
17
+ while read id; do
18
+ curl -s -X DELETE https://api.cloudflare.com/client/v4/zones/${ZONE_ID}/dns_records/${id} \
19
20
+ -H "Content-Type: application/json"
21
+ done
22
+ )
0 commit comments