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/rules/url-forwarding/bulk-redirects/create-api.mdx
+99-73Lines changed: 99 additions & 73 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ sidebar:
7
7
description: Learn how to create Bulk Redirects using the Cloudflare API.
8
8
---
9
9
10
-
import { Render } from"~/components";
10
+
import { Render, APIRequest } from"~/components";
11
11
12
12
To create Bulk Redirects via API, you must:
13
13
@@ -24,16 +24,15 @@ To create Bulk Redirects via API, you must:
24
24
25
25
Use the [Create a list](/api/resources/rules/subresources/lists/methods/create/) operation to create a new Bulk Redirect List. The list `kind` must be `redirect`.
@@ -61,6 +60,33 @@ For more information on list operations, refer to the [Lists API](/waf/tools/lis
61
60
62
61
Use the [Create list items](/api/resources/rules/subresources/lists/subresources/items/methods/create/) operation to add URL redirect items to the list. Enter the list ID from the previous step in the endpoint URL:
This is an asynchronous operation. The response will contain an `operation_id` which you will use to check if the operation completed successfully using the [Get bulk operation status](/api/resources/rules/subresources/lists/subresources/bulk_operations/methods/get/) operation:
Once the operation has completed successfully, the response will be similar to the following:
104
133
@@ -128,29 +157,28 @@ A Bulk Redirect Rule must have:
128
157
129
158
The following request of the [Create an account ruleset](/api/resources/rulesets/methods/create/) operation creates a phase entry point ruleset for the `http_request_redirect` phase at the account level, and defines a single redirect rule. Use this operation if you have not created a phase entry point ruleset for the `http_request_redirect` phase yet.
If there is already a phase entry point ruleset for the `http_request_redirect` phase, use the [Update an account ruleset](/api/resources/rulesets/methods/update/) operation instead, like in the following example:
0 commit comments