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
Copy file name to clipboardExpand all lines: src/content/docs/style-guide/api-content-strategy/guidelines-for-curl-commands.mdx
+19-19Lines changed: 19 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ sidebar:
6
6
7
7
---
8
8
9
-
Use long parameter names, like in the [API reference documentation](/api/), for clarity:
9
+
Use long parameter names for clarity:
10
10
11
11
*`--header` (instead of `-H`)
12
12
*`--request` (when needed, instead of `-X`)
@@ -33,7 +33,7 @@ If you must suggest the use of this tool, you can add a link to the [Make API ca
33
33
### Preliminary notes
34
34
35
35
* Make sure not to use typographical or smart quotes in a cURL command, or the command will fail.
36
-
* Placeholders in the URL should follow the same format as in the API documentation: `{zone_id}`
36
+
* Placeholders in the URL should follow the same format as in the API documentation: `$ZONE_ID`
37
37
* Placeholders in the request body (that is, the data included in a `POST`/`PUT`/`PATCH` request) should use this format: `<RULE_ID>`
38
38
39
39
The same placeholder name should correspond to the same value – use different placeholder names for different ID values. You can use the same request placeholders in the response, if they should match the values in the request.
@@ -43,19 +43,19 @@ The same placeholder name should correspond to the same value – use different
43
43
If using Email + API Key authentication, include the following arguments in the cURL command to add the two required HTTP headers to the request:
44
44
45
45
```txt
46
-
--header "X-Auth-Email: <EMAIL>" \
47
-
--header "X-Auth-Key: <API_KEY>" \
46
+
--header "X-Auth-Email: $CLOUDFLARE_EMAIL" \
47
+
--header "X-Auth-Key: $CLOUDFLARE_API_KEY" \
48
48
```
49
49
50
50
:::note
51
51
52
-
Ending slashes included to facilitate copy and paste. Do not include the last slash if this is the last line of the cURL command.
52
+
Ending slashes included to facilitate copy and paste. Do not include the last slash if this is the last line of the cURL command.
53
53
:::
54
54
55
55
If using API Token (the preferred authentication method), include the following arguments in the cURL command to add the required HTTP header to the request:
0 commit comments