Skip to content

Commit d65eeea

Browse files
authored
[WAF] Convert table to text (#22426)
1 parent 9852317 commit d65eeea

File tree

1 file changed

+40
-19
lines changed

1 file changed

+40
-19
lines changed

src/content/docs/waf/tools/lists/lists-api/endpoints.mdx

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,44 +3,65 @@ title: Endpoints
33
pcx_content_type: reference
44
sidebar:
55
order: 2
6-
76
---
87

98
To invoke a [Lists API](/api/resources/rules/subresources/lists/) operation, append the endpoint to the Cloudflare API base URL:
109

1110
`https://api.cloudflare.com/client/v4/`
1211

13-
For authentication instructions, refer to [Cloudflare's API: Getting Started](/fundamentals/api/get-started/).
12+
For authentication instructions, refer to [Cloudflare's API: Get started](/fundamentals/api/get-started/).
1413

1514
For help with making API calls and paginating results, refer to [Make API calls](/fundamentals/api/how-to/make-api-calls/).
1615

1716
:::note
1817

19-
2018
The Lists API endpoints require a value for `{account_id}`.
2119

2220
To retrieve a list of accounts to which you have access, use the [List Accounts](/api/resources/accounts/methods/list/) operation and note the IDs of the accounts you want to manage.
2321

24-
2522
:::
2623

2724
The Lists API supports the operations outlined below. Visit the associated links for examples.
2825

26+
## Manage lists
27+
28+
### Create a list
2929

30+
- **Operation**: [Create a list](/api/resources/rules/subresources/lists/methods/create/)
31+
- **Method and endpoint**: `POST accounts/{account_id}/rules/lists`
32+
- **Notes**: Creates an empty list.
3033

31-
## Manage lists
34+
### Get lists
3235

33-
| Operation | Endpoint | Notes |
34-
| --- | --- | --- |
35-
| [Create a list](/api/resources/rules/subresources/lists/methods/create/) | `POST accounts/{account_id}/rules/lists` | Creates an empty list |
36-
| [Get lists](/api/resources/rules/subresources/lists/methods/list/) | `GET accounts/{account_id}/rules/lists` | Fetch all lists for the account. (This request does not fetch the items in the lists.) |
37-
| [Get a list](/api/resources/rules/subresources/lists/methods/get/) | `GET accounts/{account_id}/rules/lists/{list_id}` | Fetches a list by its ID. (This request does not display the items in the list.) |
38-
| [Update a list](/api/resources/rules/subresources/lists/methods/update/) | `PUT accounts/{account_id}/rules/lists/{list_id}` | Updates the `description` of a list. You cannot edit the `name` or `kind`, and you cannot update items in a list. To update an item in a list, use the [Update all list items](/api/resources/rules/subresources/lists/subresources/items/methods/update/) operation. |
39-
| [Delete a list](/api/resources/rules/subresources/lists/methods/delete/) | `DELETE accounts/{account_id}/rules/lists/{list_id}` | Deletes the list, but only when no filters reference it. |
36+
- **Operation**: [Get lists](/api/resources/rules/subresources/lists/methods/list/)
37+
- **Method and endpoint**: `GET accounts/{account_id}/rules/lists`
38+
- **Notes**:
39+
- Fetches all lists for the account.
40+
- This request does not fetch the items in the lists.
4041

41-
## Manage items in a list
42+
### Get a list
4243

44+
- **Operation**: [Get a list](/api/resources/rules/subresources/lists/methods/get/)
45+
- **Method and endpoint**: `GET accounts/{account_id}/rules/lists/{list_id}`
46+
- **Notes**:
47+
- Fetches a list by its ID.
48+
- This request does not display the items in the list.
49+
50+
### Update a list
51+
52+
- **Operation**: [Update a list](/api/resources/rules/subresources/lists/methods/update/)
53+
- **Method and endpoint**: `PUT accounts/{account_id}/rules/lists/{list_id}`
54+
- **Notes**:
55+
- Updates the `description` of a list.
56+
- You cannot edit the `name` or `kind`, and you cannot update items in a list. To update an item in a list, use the [Update all list items](#update-all-list-items) operation.
4357

58+
### Delete a list
59+
60+
- **Operation**: [Delete a list](/api/resources/rules/subresources/lists/methods/delete/)
61+
- **Method and endpoint**: `DELETE accounts/{account_id}/rules/lists/{list_id}`
62+
- **Notes**: Deletes the list, but only when no [filters](/firewall/api/cf-filters/) reference it.
63+
64+
## Manage items in a list
4465

4566
Nearly all the operations for managing items in a list are asynchronous. When you add or delete a large amount of items to or from a list, there may be a delay before the bulk operation is complete.
4667

@@ -51,7 +72,7 @@ When you make requests to a list while a bulk operation on that list is in progr
5172
### Get list items
5273

5374
- **Operation**: [Get list items](/api/resources/rules/subresources/lists/subresources/items/methods/list/)
54-
- **Method and endpoints**: `GET accounts/{account_id}/rules/lists/{list_id}/items[?search={query}]`
75+
- **Method and endpoint**: `GET accounts/{account_id}/rules/lists/{list_id}/items[?search={query}]`
5576
- **Notes**:
5677
- Fetches items in a list (all items, by default).
5778
- Items are sorted in ascending order.
@@ -61,13 +82,13 @@ When you make requests to a list while a bulk operation on that list is in progr
6182
### Get a list item
6283

6384
- **Operation**: [Get a list item](/api/resources/rules/subresources/lists/subresources/items/methods/get/)
64-
- **Method and endpoints**: `GET accounts/{account_id}/rules/lists/{list_id}/items/{item_id}`
85+
- **Method and endpoint**: `GET accounts/{account_id}/rules/lists/{list_id}/items/{item_id}`
6586
- **Notes**: Fetches an item from a list by ID
6687

6788
### Create list items
6889

6990
- **Operation**: [Create list items](/api/resources/rules/subresources/lists/subresources/items/methods/create/)
70-
- **Method and endpoints**: `POST accounts/{account_id}/rules/lists/{list_id}/items`
91+
- **Method and endpoint**: `POST accounts/{account_id}/rules/lists/{list_id}/items`
7192
- **Notes**:
7293
- Appends a new item or items to a list.
7394
- Replaces entries that already exist in the list, does not delete any items.
@@ -77,7 +98,7 @@ When you make requests to a list while a bulk operation on that list is in progr
7798
### Update all list items
7899

79100
- **Operation**: [Update all list items](/api/resources/rules/subresources/lists/subresources/items/methods/update/)
80-
- **Method and endpoints**: `PUT accounts/{account_id}/rules/lists/{list_id}/items`
101+
- **Method and endpoint**: `PUT accounts/{account_id}/rules/lists/{list_id}/items`
81102
- **Notes**:
82103
- Deletes all current items in the list and replaces them with `items`.
83104
- When `items` is empty, deletes **all** items in the list.
@@ -86,7 +107,7 @@ When you make requests to a list while a bulk operation on that list is in progr
86107
### Delete list items
87108

88109
- **Operation**: [Delete list items](/api/resources/rules/subresources/lists/subresources/items/methods/delete/)
89-
- **Method and endpoints**: `DELETE accounts/{account_id}/rules/lists/{list_id}/items`
110+
- **Method and endpoint**: `DELETE accounts/{account_id}/rules/lists/{list_id}/items`
90111
- **Notes**:
91112
- Deletes specified list items.
92-
- The response includes an `operation_id`.
113+
- The response includes an `operation_id`.

0 commit comments

Comments
 (0)