File tree Expand file tree Collapse file tree 2 files changed +47
-3
lines changed
Expand file tree Collapse file tree 2 files changed +47
-3
lines changed Original file line number Diff line number Diff line change @@ -622,7 +622,7 @@ $ cli4 /zones/:example.com/dnssec
622622$
623623```
624624
625- ### Zone file upload CLI examples
625+ ### Zone file upload and download CLI examples (uses BIND format files)
626626
627627Refer to [ Import DNS records] ( https://api.cloudflare.com/#dns-records-for-a-zone-import-dns-records ) on API documentation for this feature.
628628
@@ -650,6 +650,27 @@ $ cli4 --post file=@zone.txt /zones/:example.com/dns_records/import
650650$
651651```
652652
653+ The following is documented within the ** Advanced** option of the DNS page within the Cloudflare portal.
654+
655+ ```
656+ $ python -m cli4 /zones/:example.com/dns_records/export | jq -r . | egrep -v '^;;|^$'
657+ $ORIGIN .
658+ @ 3600 IN SOA example.com. root.example.com. (
659+ 2025552311 ; serial
660+ 7200 ; refresh
661+ 3600 ; retry
662+ 86400 ; expire
663+ 3600) ; minimum
664+ example.com. 300 IN NS REPLACE&ME$WITH^YOUR@NAMESERVER.
665+ record4.example.com. 300 IN TXT "some text"
666+ record3.example.com. 300 IN CNAME record1.example.com.
667+ record1.example.com. 300 IN A 10.0.0.1
668+ record2.example.com. 300 IN AAAA 2001:d8b::2
669+ $
670+ ```
671+
672+ The ** jq -r** option is used to convert newlines and tabs within the JSON response data. The egrep is used for documentation brevity.
673+
653674## Implemented API calls
654675
655676The ** --dump** argument to cli4 will produce a list of all the call implemented within the library.
Original file line number Diff line number Diff line change @@ -685,8 +685,8 @@ DNSSEC CLI examples
685685 }
686686 $
687687
688- Zone file upload CLI examples
689- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
688+ Zone file upload and download CLI examples (uses BIND format files)
689+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
690690
691691Refer to `Import DNS
692692records <https://api.cloudflare.com/#dns-records-for-a-zone-import-dns-records> `__
@@ -716,6 +716,29 @@ on API documentation for this feature.
716716 }
717717 $
718718
719+ The following is documented within the **Advanced ** option of the DNS
720+ page within the Cloudflare portal.
721+
722+ ::
723+
724+ $ python -m cli4 /zones/:example.com/dns_records/export | jq -r . | egrep -v '^;;|^$'
725+ $ORIGIN .
726+ @ 3600 IN SOA example.com. root.example.com. (
727+ 2025552311 ; serial
728+ 7200 ; refresh
729+ 3600 ; retry
730+ 86400 ; expire
731+ 3600) ; minimum
732+ example.com. 300 IN NS REPLACE&ME$WITH^YOUR@NAMESERVER.
733+ record4.example.com. 300 IN TXT "some text"
734+ record3.example.com. 300 IN CNAME record1.example.com.
735+ record1.example.com. 300 IN A 10.0.0.1
736+ record2.example.com. 300 IN AAAA 2001:d8b::2
737+ $
738+
739+ The **jq -r ** option is used to convert newlines and tabs within the
740+ JSON response data. The egrep is used for documentation brevity.
741+
719742Implemented API calls
720743---------------------
721744
You can’t perform that action at this time.
0 commit comments