## Get list items `rules.lists.items.list(strlist_id, ItemListParams**kwargs) -> SyncCursorPaginationAfter[ItemListResponse]` **get** `/accounts/{account_id}/rules/lists/{list_id}/items` Fetches all the items in the list. ### Parameters - `account_id: str` The Account ID for this resource. - `list_id: str` The unique ID of the list. - `cursor: Optional[str]` The pagination cursor. An opaque string token indicating the position from which to continue when requesting the next/previous set of records. Cursor values are provided under `result_info.cursors` in the response. You should make no assumptions about a cursor's content or length. - `per_page: Optional[int]` Amount of results to include in each paginated response. A non-negative 32 bit integer. - `search: Optional[str]` A search query to filter returned items. Its meaning depends on the list type: IP addresses must start with the provided string, hostnames and bulk redirects must contain the string, and ASNs must match the string exactly. ### Returns - `ItemListResponse` - `class ListsListItemIPFull: …` - `id: str` Defines the unique ID of the item in the List. - `created_on: str` The RFC 3339 timestamp of when the list was created. - `ip: str` An IPv4 address, an IPv4 CIDR, an IPv6 address, or an IPv6 CIDR. - `modified_on: str` The RFC 3339 timestamp of when the list was last modified. - `comment: Optional[str]` Defines an informative summary of the list item. - `class ListsListItemHostnameFull: …` - `id: str` Defines the unique ID of the item in the List. - `created_on: str` The RFC 3339 timestamp of when the list was created. - `hostname: Hostname` Valid characters for hostnames are ASCII(7) letters from a to z, the digits from 0 to 9, wildcards (*), and the hyphen (-). - `url_hostname: str` - `exclude_exact_hostname: Optional[bool]` Only applies to wildcard hostnames (e.g., *.example.com). When true (default), only subdomains are blocked. When false, both the root domain and subdomains are blocked. - `modified_on: str` The RFC 3339 timestamp of when the list was last modified. - `comment: Optional[str]` Defines an informative summary of the list item. - `class ListsListItemRedirectFull: …` - `id: str` Defines the unique ID of the item in the List. - `created_on: str` The RFC 3339 timestamp of when the list was created. - `modified_on: str` The RFC 3339 timestamp of when the list was last modified. - `redirect: Redirect` The definition of the redirect. - `source_url: str` - `target_url: str` - `include_subdomains: Optional[bool]` - `preserve_path_suffix: Optional[bool]` - `preserve_query_string: Optional[bool]` - `status_code: Optional[Literal[301, 302, 307, 308]]` - `301` - `302` - `307` - `308` - `subpath_matching: Optional[bool]` - `comment: Optional[str]` Defines an informative summary of the list item. - `class ListsListItemASNFull: …` - `id: str` Defines the unique ID of the item in the List. - `asn: int` Defines a non-negative 32 bit integer. - `created_on: str` The RFC 3339 timestamp of when the list was created. - `modified_on: str` The RFC 3339 timestamp of when the list was last modified. - `comment: Optional[str]` Defines an informative summary of the list item. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) page = client.rules.lists.items.list( list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) page = page.result[0] print(page) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "result": [ { "id": "34b12448945f11eaa1b71c4d701ab86e", "created_on": "2020-01-01T08:00:00Z", "ip": "10.0.0.1", "modified_on": "2020-01-10T14:00:00Z", "comment": "Private IP address" } ], "success": true, "result_info": { "cursors": { "after": "yyy", "before": "xxx" } } } ```