Skip to content

Commit 67d295f

Browse files
RebeccaTamachirosdnts
authored andcommitted
[DNS] Use APIRequest examples for Import/Export (cloudflare#23396)
1 parent 2214b3c commit 67d295f

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/content/docs/dns/manage-dns-records/how-to/import-and-export.mdx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sidebar:
55
order: 9
66
---
77

8-
import { Render, TabItem, Tabs } from "~/components";
8+
import { Render, TabItem, Tabs, APIRequest } from "~/components";
99

1010
Use import and export to have more control over your DNS records and make processes like migrating a domain or bulk editing [record comments](/dns/manage-dns-records/reference/record-attributes/) easier.
1111

@@ -37,6 +37,14 @@ To import a zone file using the dashboard:
3737

3838
To import records using the API, send a [POST request](/api/resources/dns/subresources/records/methods/import/) with a properly [formatted file](#format-your-zone-file).
3939

40+
<APIRequest
41+
path="/zones/{zone_id}/dns_records/import"
42+
method="POST"
43+
form={{
44+
file:"@your_formatted_file.txt"
45+
}}
46+
/>
47+
4048
</TabItem> </Tabs>
4149

4250
---
@@ -58,6 +66,11 @@ To export records using the dashboard:
5866

5967
To export records using the API, send a [GET request](/api/resources/dns/subresources/records/methods/export/).
6068

69+
<APIRequest
70+
path="/zones/{zone_id}/dns_records/export"
71+
method="GET"
72+
/>
73+
6174
</TabItem> </Tabs>
6275

6376
---

0 commit comments

Comments
 (0)