Skip to content

Commit b4724c0

Browse files
committed
Update implementation guides
1 parent e845481 commit b4724c0

File tree

9 files changed

+38
-54
lines changed

9 files changed

+38
-54
lines changed

src/content/docs/learning-paths/replace-vpn/build-policies/create-policy.mdx

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@ To create a new policy, open [Zero Trust](https://one.dash.cloudflare.com/) and
3838
<TabItem label="API">
3939

4040
```bash
41-
curl https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rules \
42-
--header "X-Auth-Email: <EMAIL>" \
43-
--header "X-Auth-Key: <API_KEY>" \
41+
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
42+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
4443
--header "Content-Type: application/json" \
4544
--data '{
4645
"name": "Company Wiki DNS policy",
@@ -101,9 +100,8 @@ curl https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rules \
101100
<TabItem label="API">
102101

103102
```bash
104-
curl https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rules \
105-
--header "X-Auth-Email: <EMAIL>" \
106-
--header "X-Auth-Key: <API_KEY>" \
103+
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
104+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
107105
--header "Content-Type: application/json" \
108106
--data '{
109107
"name": "Company Wiki network policy",
@@ -159,9 +157,8 @@ We recommend adding a catch-all policy to the bottom of your network policy list
159157
<TabItem label="API">
160158

161159
```bash
162-
curl https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rules \
163-
--header "X-Auth-Email: <EMAIL>" \
164-
--header "X-Auth-Key: <API_KEY>" \
160+
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
161+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
165162
--header "Content-Type: application/json" \
166163
--data '{
167164
"name": "Catch-all block policy",

src/content/docs/learning-paths/secure-internet-traffic/build-dns-policies/create-list.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The following DNS policy will allow access to all approved corporate domains inc
2828
<TabItem label="API">
2929

3030
```sh
31-
curl https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rules \
31+
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
3232
--header 'Content-Type: application/json' \
3333
--header "Authorization: Bearer <API_TOKEN>" \
3434
--data '{

src/content/docs/learning-paths/secure-internet-traffic/build-dns-policies/create-policy.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ For more information, refer to [DNS policies](/cloudflare-one/policies/gateway/d
3737
To create a new DNS policy using cURL:
3838

3939
```sh
40-
curl https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rules \
40+
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
4141
--header 'Content-Type: application/json' \
4242
--header "Authorization: Bearer <API_TOKEN>" \
4343
--data '{

src/content/docs/learning-paths/secure-internet-traffic/build-egress-policies/deploy-egress-ips.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ We recommend building baseline egress policies that can cover a majority of your
4242
<TabItem label="API">
4343

4444
```bash
45-
curl https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rules \
45+
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
4646
--header "Authorization: Bearer <API_TOKEN>" \
4747
--header "Content-Type: application/json" \
4848
--data '{

src/content/docs/learning-paths/secure-internet-traffic/build-http-policies/browser-isolation.mdx

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,8 @@ You can control potential risk and shape user behavior without applying heavy-ha
4848
</TabItem> <TabItem label="API">
4949

5050
```bash
51-
curl https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rules \
52-
--header "X-Auth-Email: <EMAIL>" \
53-
--header "X-Auth-Key: <API_KEY>" \
51+
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
52+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
5453
--header "Content-Type: application/json" \
5554
--data '{
5655
"action": "isolate",
@@ -117,9 +116,8 @@ In this context, if some traffic is unknown to your organization, Cloudflare wil
117116
</TabItem> <TabItem label="API">
118117

119118
```bash title="Allow known applications and websites"
120-
curl https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rules \
121-
--header "X-Auth-Email: <EMAIL>" \
122-
--header "X-Auth-Key: <API_KEY>" \
119+
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
120+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
123121
--header "Content-Type: application/json" \
124122
--data '{
125123
"action": "isolate",
@@ -142,9 +140,8 @@ curl https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rules \
142140
```
143141

144142
```bash title="Block security risks"
145-
curl https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rules \
146-
--header "X-Auth-Email: <EMAIL>" \
147-
--header "X-Auth-Key: <API_KEY>" \
143+
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
144+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
148145
--header "Content-Type: application/json" \
149146
--data '{
150147
"action": "isolate",
@@ -167,9 +164,8 @@ curl https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rules \
167164
```
168165

169166
```bash title="Isolate all other traffic"
170-
curl https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rules \
171-
--header "X-Auth-Email: <EMAIL>" \
172-
--header "X-Auth-Key: <API_KEY>" \
167+
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
168+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
173169
--header "Content-Type: application/json" \
174170
--data '{
175171
"action": "isolate",

src/content/docs/learning-paths/secure-internet-traffic/build-http-policies/data-loss-prevention.mdx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,8 @@ To help this better match the needs of your organization, you can also build a c
4646
</TabItem> <TabItem label="API">
4747

4848
```bash
49-
curl https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rules \
50-
--header "X-Auth-Email: <EMAIL>" \
51-
--header "X-Auth-Key: <API_KEY>" \
49+
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
50+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
5251
--header "Content-Type: application/json" \
5352
--data '{
5453
"action": "block",
@@ -98,9 +97,8 @@ For example, you can use a custom expression to detect when your users share pro
9897
<TabItem label="API">
9998

10099
```bash
101-
curl https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rules \
102-
--header "X-Auth-Email: <EMAIL>" \
103-
--header "X-Auth-Key: <API_KEY>" \
100+
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
101+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
104102
--header "Content-Type: application/json" \
105103
--data '{
106104
"action": "block",
@@ -158,7 +156,7 @@ Many organizations want to detect and log financial information egressing from u
158156
<TabItem label="API">
159157

160158
```bash title="Block financial information shared with AI"
161-
curl https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rules \
159+
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
162160
--header "Authorization: Bearer <API_TOKEN>" \
163161
--header "Content-Type: application/json" \
164162
--data '{

src/content/docs/learning-paths/secure-internet-traffic/build-http-policies/tls-inspection.mdx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ For example, if users are issued a corporate-managed iPhone with limited permiss
7777
1. Create a list of device serial numbers that you do not want to inspect.
7878

7979
```bash
80-
curl https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/lists \
80+
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/lists \
8181
--header "X-Auth-Email: <EMAIL>" \
8282
--header "X-Auth-Key: <API_KEY>" \
8383
--header "Content-Type: application/json" \
@@ -96,7 +96,7 @@ For example, if users are issued a corporate-managed iPhone with limited permiss
9696
2. Create a Do Not Inspect policy that checks the device against the list of serial numbers.
9797

9898
```bash
99-
curl https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rules \
99+
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
100100
--header "X-Auth-Email: <EMAIL>" \
101101
--header "X-Auth-Key: <API_KEY>" \
102102
--header "Content-Type: application/json" \
@@ -141,9 +141,8 @@ If you filter your network-connected devices with Magic WAN tunnels, the WARP Co
141141
</TabItem> <TabItem label="API">
142142

143143
```bash
144-
curl https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rules \
145-
--header "X-Auth-Email: <EMAIL>" \
146-
--header "X-Auth-Key: <API_KEY>" \
144+
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
145+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
147146
--header "Content-Type: application/json" \
148147
--data '{
149148
"name": "Do not inspect corporate devices",

src/content/docs/learning-paths/zero-trust-web-access/advanced-workflows/isolate-application.mdx

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,8 @@ with HTTP policies applied"]
6767
<TabItem label="API">
6868

6969
```bash
70-
curl https://api.cloudflare.com/client/v4/accounts/{account_id}/access/apps/{app_uuid}/policies \
71-
--header "X-Auth-Email: <EMAIL>" \
72-
--header "X-Auth-Key: <API_KEY>" \
70+
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/access/apps/$APP_UUID/policies \
71+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
7372
--header "Content-Type: application/json" \
7473
--data '{
7574
"decision": "allow",
@@ -114,9 +113,8 @@ To create a list of serial numbers, refer to [Create Zero Trust list](/api/resou
114113
<TabItem label="API">
115114

116115
```bash
117-
curl https://api.cloudflare.com/client/v4/accounts/{account_id}/access/apps/{app_uuid}/policies \
118-
--header "X-Auth-Email: <EMAIL>" \
119-
--header "X-Auth-Key: <API_KEY>" \
116+
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/access/apps/$APP_UUID/policies \
117+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
120118
--header "Content-Type: application/json" \
121119
--data '{
122120
"decision": "allow",
@@ -164,9 +162,8 @@ Prevents users on unmanaged devices from downloading any files from your private
164162
<TabItem label="API">
165163

166164
```bash
167-
curl https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rules \
168-
--header "X-Auth-Email: <EMAIL>" \
169-
--header "X-Auth-Key: <API_KEY>" \
165+
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
166+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
170167
--header "Content-Type: application/json" \
171168
--data '{
172169
"name": "Disable file downloads in isolated browser",
@@ -250,9 +247,8 @@ Block users on unmanaged devices from downloading files that contain credit card
250247
<TabItem label="API">
251248

252249
```bash
253-
curl https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rules \
254-
--header "X-Auth-Email: <EMAIL>" \
255-
--header "X-Auth-Key: <API_KEY>" \
250+
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
251+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
256252
--header "Content-Type: application/json" \
257253
--data '{
258254
"name": "Block credit card numbers",

src/content/partials/learning-paths/zero-trust/device-profiles.mdx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,8 @@ To customize the default settings:
4848

4949
```bash
5050
curl --request PATCH \
51-
https://api.cloudflare.com/client/v4/accounts/{account_id}/devices/policy \
52-
--header "X-Auth-Email: <EMAIL>" \
53-
--header "X-Auth-Key: <API_KEY>" \
51+
https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/devices/policy \
52+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
5453
--header "Content-Type: application/json" \
5554
--data '{
5655
"allow_mode_switch": false,
@@ -72,9 +71,8 @@ https://api.cloudflare.com/client/v4/accounts/{account_id}/devices/policy \
7271

7372
```bash
7473
curl --request PUT \
75-
https://api.cloudflare.com/client/v4/accounts/{account_id}/devices/settings \
76-
--header "X-Auth-Email: <EMAIL>" \
77-
--header "X-Auth-Key: <API_KEY>" \
74+
https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/devices/settings \
75+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
7876
--header "Content-Type: application/json" \
7977
--data '{
8078
"disable_for_time": 3600,

0 commit comments

Comments
 (0)