1CLI4(1)                     General Commands Manual                    CLI4(1)
2
3
4

NAME

6       cli4 - Command line access to Cloudflare v4 API
7
8

SYNOPSIS

10       cli4 [-V|--version] [-h|--help] [-v|--verbose] [-q|--quiet] [-j|--json]
11       [-y|--yaml]   [-n|--ndjson]   [-r|--raw]   [-d|--dump]   [-p   profile-
12       name|--profile  profile-name]  [item=value  ...]   [item=@filename ...]
13       [-G|--get]  [-P|--patch]  [-O|--post]  [-U|--put]  [-D|--delete]  /com‐
14       mand...
15
16

DESCRIPTION

18       cli4 provides command line access to Cloudflare v4 API
19
20

OPTIONS

22       [-V, --version]
23              Display program version number and exit.
24
25       [-h, --help]
26              This information (in a terse form).
27
28       [-v, --verbose]
29              Provide some protcol debugging information.
30
31       [-q, --quiet]
32              Don't output any JSON/YAML responses.
33
34       [-j, --json]
35              Output response data in JSON format (the default).
36
37       [-y, --yaml]
38              Output response data in YAML format (if yaml package installed).
39
40       [-n, --ndjson]
41              Output  response  data  in  NDJSON  format (if jsonlines package
42              installed).
43
44       [-r, --raw]
45              Output JSON results in raw mode without splitting out the errors
46              and results.
47
48       [-d, --dump]
49              Output a list of all API calls included in the code.
50
51       [-p profile-name, --profile profile-name]
52              Select  a profile-name from the configuration file (hence select
53              custom email/token values).
54
55       --get  Send HTTP request as a GET (the default).
56
57       --patch
58              Send HTTP request as a PATCH.
59
60       --post Send HTTP request as a POST.
61
62       --put  Send HTTP request as a PUT.
63
64       --delete
65              Send HTTP request as a DELETE.
66
67       item=value
68              Set a paramater or data value to send with a GET,  PATCH,  POST,
69              PUT or DELETE command. The value is sent as a string.
70
71       item:=value
72              Set  a  paramater or data value to send with a GET, PATCH, POST,
73              PUT or DELETE command. The value is sent as an interger.
74
75       item=@filename
76              Set a paramater or data value to send with a POST  or  PUT  com‐
77              mand. The value is based on the content of the file.
78
79       /command ...
80              The API command(s) to execute.
81
82

COMMAND(S)

84       The command string uses slash (/) to seperate the verbs in the same way
85       that the Cloudflare v4 API documentation does.  Any verb starting  with
86       colon (:) is either converted to zone_id, user_id, organtization_id, or
87       otherwise.
88
89

RESULTS

91       The output is either JSON or YAML formatted.
92
93

EXAMPLES

95       cli4 /zones List infomation for all zones.
96
97       cli4 /zones/:example.com List specific zone info.
98
99       cli4 /zones/:example.com/settings List settings for a specific zone.
100
101       cli4  --delete  purge_everything=true   /zones/:example.com/purge_cache
102       Purge cache for a specific zone.
103
104       cli4 --delete files='[http://example.com/css/styles.css]' /zones/:exam‐
105       ple.com/purge_cache Purge cache for a specific zone.
106
107       cli4  --delete   files='[http://example.com/css/styles.css,http://exam
108       ple.com/js/script.js] /zones/:example.com/purge_cache Purge cache for a
109       specific zone.
110
111       cli4 --delete  tags='[tag1,tag2,tag3]'  /zones/:example.com/purge_cache
112       Purge cache for a specific zone.
113
114       cli4  /zones/:example.com/available_plans  List  available  plans for a
115       zone.
116
117       cli4  --patch  status=active  /zones/:example.com/dnssec  Make   DNSSEC
118       active for specfic zone.
119
120       cli4 /zones/:example.com/dnssec List DNSSEC infomation and status for a
121       specific zone.
122
123

SEE ALSO

125       The Cloudflare API can be found https://api.cloudflare.com/.  Each  API
126       call  is  provided via a similarly named function within the Cloudflare
127       class.
128
129
130
131                                                                       CLI4(1)
Impressum