You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 22, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+23-6Lines changed: 23 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -463,7 +463,7 @@ import CloudFlare
463
463
464
464
### Exception examples
465
465
466
-
Here's examples using the CLI command cli4 of the responses passed back in exceptions.
466
+
Here's examples using the CLI command `cli4` of the responses passed back in exceptions.
467
467
468
468
First a simple get with a clean (non-error) response.
469
469
@@ -604,12 +604,23 @@ if __name__ == '__main__':
604
604
605
605
## CLI
606
606
607
-
All API calls can be called from the command line.
608
-
The command will convert domain names prefixed with a colon (`:`) into zone_identifiers: e.g. to view `example.com` you must use `cli4 /zones/:example.com` (the zone ID cannot be used).
607
+
All API calls can be called from the command line via the `cli4` command.
608
+
Additionally, the `cli4` command will convert domain name or account name prefixed with a colon (`:`) into the correct identifier.
609
+
e.g. to view `example.com` you can use `cli4 /zones/:example.com`.
610
+
You can pass the zone identifier (or account identifier or any identifier) with a colon followed by the identifier as a hex number 32 characters long.
@@ -645,7 +656,13 @@ Data can also be uploaded from file contents. Using the ```item=@filename``` for
645
656
646
657
### CLI output
647
658
648
-
The output from the CLI command is in JSON or YAML format (and human readable). This is controled by the **--yaml** or **--json** flags (JSON is the default).
659
+
The default output from the CLI command is in JSON.
660
+
It can also output YAML format (i.e. human readable).
661
+
This is controled by the `--yaml` or `--json` flags (JSON is the default).
662
+
There is also a `--ndjson` flag for use with line based JSON data - this is mainly used for log data.
663
+
664
+
Additonally the output can be plain text or binary image format depending on the results from the API call (some calls results in non JSON results).
665
+
The `--image` flag will return the data in the same format as the API's results.
0 commit comments