Skip to content

Commit cc0c51b

Browse files
authored
[Docs] Update API links (#19003)
1 parent 620c8cc commit cc0c51b

File tree

11 files changed

+23
-24
lines changed

11 files changed

+23
-24
lines changed

src/content/docs/dns/dns-firewall/faq.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,6 @@ Yes. The default TTL is 30 seconds. You can set `negative_cache_ttl` via the [AP
6262
To set up PTR records for the DNS Firewall cluster IPs that point to your nameserver hostnames, use the following API endpoints:
6363

6464
- [Show DNS Firewall Cluster Reverse DNS](/api/resources/dns_firewall/subresources/reverse_dns/methods/get/)
65-
- [Update DNS Firewall Cluster Reverse DNS](/api/resources/dns_firewall/methods/edit/-reverse-dns)
65+
- [Update DNS Firewall Cluster Reverse DNS](/api/resources/dns_firewall/subresources/reverse_dns/methods/edit/)
6666

6767
</Details>

src/content/docs/ruleset-engine/basic-operations/add-rule-phase-rulesets.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ https://api.cloudflare.com/client/v4/zones/{zone_id}/phases/http_request_firewal
9090

9191
<Details header="Example: Add a single rule to a phase entry point ruleset at the zone level">
9292

93-
The following example adds a single rule to a phase entry point ruleset (with ID `{ruleset_id}`) at the zone level using the [Create a zone ruleset rule](/api/resources/rulesets/methods/create/) operation.
93+
The following example adds a single rule to a phase entry point ruleset (with ID `{ruleset_id}`) at the zone level using the [Create a zone ruleset rule](/api/resources/rulesets/subresources/rules/methods/create/) operation.
9494

9595
```bash
9696
curl https://api.cloudflare.com/client/v4/zone/{zone_id}/rulesets/{ruleset_id}/rules \

src/content/docs/ruleset-engine/custom-rulesets/add-rules-ruleset.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ When you add rules to a custom ruleset using the [Update an account ruleset](/ap
1313

1414
You can use other API operations depending on the type of operation:
1515

16-
- Add a single rule to an existing custom ruleset: Use the [Create an account ruleset rule](/api/resources/rulesets/methods/create/Rule) operation.
16+
- Add a single rule to an existing custom ruleset: Use the [Create an account ruleset rule](/api/resources/rulesets/subresources/rules/methods/create/) operation.
1717
- Update a single rule in a custom ruleset: Use the [Update an account ruleset rule](/api/resources/rulesets/subresources/rules/methods/edit/) operation.
1818

1919
:::

src/content/docs/ruleset-engine/rulesets-api/add-rule.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ Use one of the following API endpoints:
1717
| [Create an account ruleset rule][ar-account] | `POST /accounts/{account_id}/rulesets/{ruleset_id}/rules` |
1818
| [Create a zone ruleset rule][ar-zone] | `POST /zones/{zone_id}/rulesets/{ruleset_id}/rules` |
1919

20-
[ar-account]: /api/resources/rulesets/methods/create/Rule
21-
[ar-zone]: /api/resources/rulesets/methods/create/
20+
[ar-account]: /api/resources/rulesets/subresources/rules/methods/create/
21+
[ar-zone]: /api/resources/rulesets/subresources/rules/methods/create/
2222

2323
Include the rule definition in the request body.
2424

src/content/docs/ruleset-engine/rulesets-api/delete.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Use one of the following API endpoints:
5656
| [Delete an account ruleset version][drv-account] | `DELETE /accounts/{account_id}/rulesets/{ruleset_id}/versions/{version_number}` |
5757
| [Delete a zone ruleset version][drv-zone] | `DELETE /zones/{zone_id}/rulesets/{ruleset_id}/versions/{version_number}` |
5858

59-
[drv-account]: /api/resources/rulesets/methods/delete/Version
59+
[drv-account]: /api/resources/rulesets/subresources/versions/methods/delete/
6060
[drv-zone]: /api/resources/rulesets/subresources/versions/methods/delete/
6161

6262
If the delete operation succeeds, the method call returns a `204 No Content` HTTP status code.

src/content/docs/ruleset-engine/rulesets-api/view.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,9 @@ Use one of the following API endpoints:
195195
| [Get an account entry point ruleset version][gerv-account] | `GET /accounts/{account_id}/rulesets/phases/{phase_name}/entrypoint/versions/{version_number}` |
196196
| [Get a zone entry point ruleset version][gerv-zone] | `GET /zones/{zone_id}/rulesets/phases/{phase_name}/entrypoint/versions/{version_number}` |
197197

198-
[grv-account]: /api/resources/rulesets/methods/get/Version
198+
[grv-account]: /api/resources/rulesets/subresources/versions/methods/get/
199199
[grv-zone]: /api/resources/rulesets/subresources/versions/methods/get/
200-
[gerv-account]: /api/resources/rulesets/subresources/phases/methods/get/Version
200+
[gerv-account]: /api/resources/rulesets/subresources/phases/subresources/versions/methods/get/
201201
[gerv-zone]: /api/resources/rulesets/subresources/phases/subresources/versions/methods/get/
202202

203203
When the specified phase entry point ruleset does not exist, this API method returns a `404 Not Found` HTTP status code.

src/content/docs/waf/custom-rules/skip/api-examples.mdx

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ sidebar:
66
head:
77
- tag: title
88
content: API examples of custom rules with the Skip action
9-
109
---
1110

1211
Use the [Rulesets API](/ruleset-engine/rulesets-api/) to configure custom rules via API.
@@ -17,17 +16,17 @@ The `skip` action supports different [skip options](/waf/custom-rules/skip/optio
1716

1817
This page contains examples of different skip rule scenarios for custom rules. Take the following into account:
1918

20-
* The `{zone_id}` value is the [ID of the zone](/fundamentals/setup/find-account-and-zone-ids/) where you want to add the rule.
19+
- The `{zone_id}` value is the [ID of the zone](/fundamentals/setup/find-account-and-zone-ids/) where you want to add the rule.
2120

22-
* The `{ruleset_id}` value is the ID of the [entry point ruleset](/ruleset-engine/about/rulesets/#entry-point-ruleset) of the `http_request_firewall_custom` phase. For details on obtaining this ruleset ID, refer to [List and view rulesets](/ruleset-engine/rulesets-api/view/). The API examples in this page add a skip rule to an existing ruleset using the [Create a zone ruleset rule](/api/resources/rulesets/methods/create/) operation.
21+
- The `{ruleset_id}` value is the ID of the [entry point ruleset](/ruleset-engine/about/rulesets/#entry-point-ruleset) of the `http_request_firewall_custom` phase. For details on obtaining this ruleset ID, refer to [List and view rulesets](/ruleset-engine/rulesets-api/view/). The API examples in this page add a skip rule to an existing ruleset using the [Create a zone ruleset rule](/api/resources/rulesets/subresources/rules/methods/create/) operation.
2322

2423
However, the entry point ruleset may not exist yet. In this case, invoke the [Create a zone ruleset](/api/resources/rulesets/methods/create/) operation to create the entry point ruleset with a skip rule. Refer to [Create ruleset](/ruleset-engine/rulesets-api/create/#example---create-a-zone-level-phase-entry-point-ruleset) for an example.
2524

26-
* Although each example only includes one action parameter, you can use several skip options in the same rule by specifying the `ruleset`, `phases`, and `products` action parameters simultaneously.
25+
- Although each example only includes one action parameter, you can use several skip options in the same rule by specifying the `ruleset`, `phases`, and `products` action parameters simultaneously.
2726

2827
## Skip the remaining rules in the current ruleset
2928

30-
This example invokes the [Create a zone ruleset rule](/api/resources/rulesets/methods/create/) operation to add a skip rule to the existing `http_request_firewall_custom` phase entry point ruleset with ID `{ruleset_id}`. The rule will skip all remaining rules in the current ruleset for requests matching the rule expression:
29+
This example invokes the [Create a zone ruleset rule](/api/resources/rulesets/subresources/rules/methods/create/) operation to add a skip rule to the existing `http_request_firewall_custom` phase entry point ruleset with ID `{ruleset_id}`. The rule will skip all remaining rules in the current ruleset for requests matching the rule expression:
3130

3231
```bash
3332
curl https://api.cloudflare.com/client/v4/zones/{zone_id}/rulesets/{ruleset_id}/rules \
@@ -45,7 +44,7 @@ curl https://api.cloudflare.com/client/v4/zones/{zone_id}/rulesets/{ruleset_id}/
4544

4645
## Skip a phase
4746

48-
This example invokes the [Create a zone ruleset rule](/api/resources/rulesets/methods/create/) operation to add a rule to the existing `http_request_firewall_custom` phase entry point ruleset with ID `{ruleset_id}`. The rule will skip the `http_ratelimit` phase for requests matching the rule expression:
47+
This example invokes the [Create a zone ruleset rule](/api/resources/rulesets/subresources/rules/methods/create/) operation to add a rule to the existing `http_request_firewall_custom` phase entry point ruleset with ID `{ruleset_id}`. The rule will skip the `http_ratelimit` phase for requests matching the rule expression:
4948

5049
```bash
5150
curl https://api.cloudflare.com/client/v4/zones/{zone_id}/rulesets/{ruleset_id}/rules \
@@ -67,10 +66,10 @@ Refer to [Available skip options](/waf/custom-rules/skip/options/) for the list
6766

6867
## Skip a phase and do not log matching requests
6968

70-
This example invokes the [Create a zone ruleset rule](/api/resources/rulesets/methods/create/) operation to add a rule that:
69+
This example invokes the [Create a zone ruleset rule](/api/resources/rulesets/subresources/rules/methods/create/) operation to add a rule that:
7170

72-
* Skips the `http_ratelimit` phase
73-
* Disables event logging for the current rule
71+
- Skips the `http_ratelimit` phase
72+
- Disables event logging for the current rule
7473

7574
```bash
7675
curl https://api.cloudflare.com/client/v4/zones/{zone_id}/rulesets/{ruleset_id}/rules \
@@ -95,7 +94,7 @@ Refer to [Available skip options: Logging](/waf/custom-rules/skip/options/#loggi
9594

9695
## Skip security products
9796

98-
This example uses the [Create a zone ruleset rule](/api/resources/rulesets/methods/create/) operation to add a rule that skips the [Zone Lockdown](/waf/tools/zone-lockdown/) and [User Agent Blocking](/waf/tools/user-agent-blocking/) products for requests matching the rule expression:
97+
This example uses the [Create a zone ruleset rule](/api/resources/rulesets/subresources/rules/methods/create/) operation to add a rule that skips the [Zone Lockdown](/waf/tools/zone-lockdown/) and [User Agent Blocking](/waf/tools/user-agent-blocking/) products for requests matching the rule expression:
9998

10099
```bash
101100
curl https://api.cloudflare.com/client/v4/zones/{zone_id}/rulesets/{ruleset_id}/rules \

src/content/docs/waf/managed-rules/waf-exceptions/define-api.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ The following example adds a rule that skips all remaining rules in the entry po
6060

6161
Save the entry point ruleset ID (`060013b1eeb14c93b0dcd896537e0d2c`) for the next step.
6262

63-
2. Invoke the [Create a zone ruleset rule](/api/resources/rulesets/methods/create/) operation (a `POST` request) to add an exception (or skip rule) at the beginning of the rules list, since a skip rule applies only to rules listed after it. The exact rule location is defined in the [`position` object](/ruleset-engine/rulesets-api/add-rule/#define-the-rule-position-in-the-ruleset).
63+
2. Invoke the [Create a zone ruleset rule](/api/resources/rulesets/subresources/rules/methods/create/) operation (a `POST` request) to add an exception (or skip rule) at the beginning of the rules list, since a skip rule applies only to rules listed after it. The exact rule location is defined in the [`position` object](/ruleset-engine/rulesets-api/add-rule/#define-the-rule-position-in-the-ruleset).
6464

6565
```bash
6666
curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/rulesets/{entry_point_ruleset_id}/rules" \
@@ -138,7 +138,7 @@ The following example adds a rule that skips the [Cloudflare Managed Ruleset](/w
138138
- The ID of the entry point ruleset (`060013b1eeb14c93b0dcd896537e0d2c` in this example)
139139
- The ID of the `execute` rule deployment the managed ruleset (`1bdb49371c1f46958fc8b985efcb79e7` in this example)
140140

141-
2. Invoke the [Create a zone ruleset rule](/api/resources/rulesets/methods/create/) operation (a `POST` request) to add an exception (or skip rule) immediately before the `execute` rule deploying the Cloudflare Managed Ruleset, since a skip rule applies only to rules listed after it. The exact rule location is defined in the [`position` object](/ruleset-engine/rulesets-api/add-rule/#define-the-rule-position-in-the-ruleset).
141+
2. Invoke the [Create a zone ruleset rule](/api/resources/rulesets/subresources/rules/methods/create/) operation (a `POST` request) to add an exception (or skip rule) immediately before the `execute` rule deploying the Cloudflare Managed Ruleset, since a skip rule applies only to rules listed after it. The exact rule location is defined in the [`position` object](/ruleset-engine/rulesets-api/add-rule/#define-the-rule-position-in-the-ruleset).
142142

143143
```bash
144144
curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/rulesets/{entry_point_ruleset_id}/rules" \
@@ -270,7 +270,7 @@ The following example adds a rule that skips a particular rule of the [Cloudflar
270270
- The ID of the Cloudflare Managed Ruleset (<RuleID id="efb7b8c949ac4650a09736fc376e9aee" />)
271271
- The ID of the rule to skip (<RuleID id="d9e350f1b72d4730899c8a420e48a85d" /> in this example)
272272

273-
3. Invoke the [Create a zone ruleset rule](/api/resources/rulesets/methods/create/) operation (a `POST` request) to add an exception (or skip rule) immediately before the `execute` rule deploying the Cloudflare Managed Ruleset, since a skip rule applies only to rules listed after it.
273+
3. Invoke the [Create a zone ruleset rule](/api/resources/rulesets/subresources/rules/methods/create/) operation (a `POST` request) to add an exception (or skip rule) immediately before the `execute` rule deploying the Cloudflare Managed Ruleset, since a skip rule applies only to rules listed after it.
274274

275275
```bash
276276
curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/rulesets/{entry_point_ruleset_id}/rules" \

src/content/partials/waf/api-generic-create-rule-procedure.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ To create a {props.ruleType} for a zone, add a rule <Markdown text={props.extraO
1111

1212
1. Invoke the [Get a zone entry point ruleset](/api/resources/rulesets/subresources/phases/methods/get/) operation to obtain the definition of the entry point ruleset for the <code>{props.phaseName}</code> phase. You will need the [zone ID](/fundamentals/setup/find-account-and-zone-ids/) for this task.
1313

14-
2. If the entry point ruleset already exists (that is, if you received a `200 OK` status code and the ruleset definition), take note of the ruleset ID in the response. Then, invoke the [Create a zone ruleset rule](/api/resources/rulesets/methods/create/) operation to add a {props.ruleType} to the existing ruleset. Refer to the examples below for details.
14+
2. If the entry point ruleset already exists (that is, if you received a `200 OK` status code and the ruleset definition), take note of the ruleset ID in the response. Then, invoke the [Create a zone ruleset rule](/api/resources/rulesets/subresources/rules/methods/create/) operation to add a {props.ruleType} to the existing ruleset. Refer to the examples below for details.
1515

1616
3. If the entry point ruleset does not exist (that is, if you received a `404 Not Found` status code in step 1), create it using the [Create a zone ruleset](/api/resources/rulesets/methods/create/) operation. Include your {props.ruleType} in the `rules` array. Refer to [Create ruleset](/ruleset-engine/rulesets-api/create/#example---create-a-zone-level-phase-entry-point-ruleset) for an example.

src/content/partials/waf/rulesets/api-account/step2-create-rule.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ params:
55

66
import { Markdown } from "~/components";
77

8-
If the entry point ruleset already exists (that is, if you received a `200 OK` status code and the ruleset definition), take note of the ruleset ID in the response. Then, invoke the [Create an account ruleset rule](/api/resources/rulesets/methods/create/Rule) operation to add an `execute` rule to the existing ruleset deploying the <Markdown text={props.deploymentItem} />. By default, the rule will be added at the end of the list of rules already in the ruleset.
8+
If the entry point ruleset already exists (that is, if you received a `200 OK` status code and the ruleset definition), take note of the ruleset ID in the response. Then, invoke the [Create an account ruleset rule](/api/resources/rulesets/subresources/rules/methods/create/) operation to add an `execute` rule to the existing ruleset deploying the <Markdown text={props.deploymentItem} />. By default, the rule will be added at the end of the list of rules already in the ruleset.

0 commit comments

Comments
 (0)