Skip to content

Commit c6adbb0

Browse files
Replace API examples in dns/dnssec pages
1 parent 5c19b04 commit c6adbb0

File tree

2 files changed

+27
-33
lines changed

2 files changed

+27
-33
lines changed

src/content/docs/dns/dnssec/dnssec-active-migration.mdx

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -60,23 +60,21 @@ The provider you are migrating from must allow you to add DNSKEY records on the
6060

6161
You can do this [on the dashboard](/dns/manage-dns-records/how-to/create-dns-records/#create-dns-records) or through the [Create DNS Record endpoint](/api/resources/dns/subresources/records/methods/create/), as in the following example.
6262

63-
```bash
64-
curl https://api.cloudflare.com/client/v4/zones/{zone_id}/dns_records \
65-
--header "X-Auth-Email: <EMAIL>" \
66-
--header "X-Auth-Key: <API_KEY>" \
67-
--header "Content-Type: application/json" \
68-
--data '{
69-
"type": "DNSKEY",
70-
"name": "<ZONE_NAME>",
71-
"data": {
72-
"flags": 256,
73-
"protocol": 3,
74-
"algorithm": 13,
75-
"public_key": "<PUBLIC_KEY>"
76-
},
77-
"ttl":3600
78-
}'
79-
```
63+
<APIRequest
64+
path="/zones/{zone_id}/dns_records"
65+
method="POST"
66+
json={{
67+
"type": "DNSKEY",
68+
"name": "<ZONE_NAME>",
69+
"data": {
70+
"flags": 256,
71+
"protocol": 3,
72+
"algorithm": 13,
73+
"public_key": "<PUBLIC_KEY>"
74+
},
75+
"ttl": 3600
76+
}}
77+
/>
8078

8179
2. Get Cloudflare's ZSK using either the API or a query from one of the assigned Cloudflare nameservers.
8280

src/content/docs/dns/dnssec/multi-signer-dnssec/setup.mdx

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,10 @@ For the purpose of this tutorial, you will update your registrar with the DS rec
5555

5656
2. Add the ZSK(s) of your external provider(s) to Cloudflare by creating a DNSKEY record on your zone.
5757

58-
```bash
59-
curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/dns_records" \
60-
--header "X-Auth-Email: <EMAIL>" \
61-
--header "X-Auth-Key: <API_KEY>" \
62-
--header "Content-Type: application/json" \
63-
--data '{
58+
<APIRequest
59+
path="/zones/{zone_id}/dns_records"
60+
method="POST"
61+
json={{
6462
"type": "DNSKEY",
6563
"name": "<ZONE_NAME>",
6664
"data": {
@@ -70,23 +68,21 @@ curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/dns_records" \
7068
"public_key": "<PUBLIC_KEY>"
7169
},
7270
"ttl": 3600
73-
}'
74-
```
71+
}}
72+
/>
7573

7674
3. Add your external provider(s) nameservers as NS records on your zone apex.
7775

78-
```bash
79-
curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/dns_records" \
80-
--header "X-Auth-Email: <EMAIL>" \
81-
--header "X-Auth-Key: <API_KEY>" \
82-
--header "Content-Type: application/json" \
83-
--data '{
76+
<APIRequest
77+
path="/zones/{zone_id}/dns_records"
78+
method="POST"
79+
json={{
8480
"type": "NS",
8581
"name": "<ZONE_NAME>",
8682
"content": "<NS_DOMAIN>",
8783
"ttl": 86400
88-
}'
89-
```
84+
}}
85+
/>
9086

9187
4. Enable the usage of the nameservers you added in the previous step by using the API request below.
9288

0 commit comments

Comments
 (0)