Skip to content
Start here

Lists

Get lists
client.rules.lists.list(ListListParams { account_id } params, RequestOptionsoptions?): SinglePage<ListsList { id, created_on, kind, 5 more } >
GET/accounts/{account_id}/rules/lists
Get a list
client.rules.lists.get(stringlistId, ListGetParams { account_id } params, RequestOptionsoptions?): ListGetResponse { id, created_on, kind, 5 more }
GET/accounts/{account_id}/rules/lists/{list_id}
Create a list
client.rules.lists.create(ListCreateParams { account_id, kind, name, description } params, RequestOptionsoptions?): ListCreateResponse { id, created_on, kind, 5 more }
POST/accounts/{account_id}/rules/lists
Update a list
client.rules.lists.update(stringlistId, ListUpdateParams { account_id, description } params, RequestOptionsoptions?): ListUpdateResponse { id, created_on, kind, 5 more }
PUT/accounts/{account_id}/rules/lists/{list_id}
Delete a list
client.rules.lists.delete(stringlistId, ListDeleteParams { account_id } params, RequestOptionsoptions?): ListDeleteResponse { id }
DELETE/accounts/{account_id}/rules/lists/{list_id}
ModelsExpand Collapse
Hostname { url_hostname, exclude_exact_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: string
exclude_exact_hostname?: boolean

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.

ListsList { id, created_on, kind, 5 more }
id: string

The unique ID of the list.

maxLength32
minLength32
created_on: string

The RFC 3339 timestamp of when the list was created.

kind: "ip" | "redirect" | "hostname" | "asn"

The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects).

One of the following:
"ip"
"redirect"
"hostname"
"asn"
modified_on: string

The RFC 3339 timestamp of when the list was last modified.

name: string

An informative name for the list. Use this name in filter and rule expressions.

maxLength50
num_items: number

The number of items in the list.

num_referencing_filters: number

The number of filters referencing the list.

description?: string

An informative summary of the list.

maxLength500
Redirect { source_url, target_url, include_subdomains, 4 more }

The definition of the redirect.

source_url: string
target_url: string
include_subdomains?: boolean
preserve_path_suffix?: boolean
preserve_query_string?: boolean
status_code?: 301 | 302 | 307 | 308
One of the following:
301
302
307
308
subpath_matching?: boolean
ListGetResponse { id, created_on, kind, 5 more }
id: string

The unique ID of the list.

maxLength32
minLength32
created_on: string

The RFC 3339 timestamp of when the list was created.

kind: "ip" | "redirect" | "hostname" | "asn"

The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects).

One of the following:
"ip"
"redirect"
"hostname"
"asn"
modified_on: string

The RFC 3339 timestamp of when the list was last modified.

name: string

An informative name for the list. Use this name in filter and rule expressions.

maxLength50
num_items: number

The number of items in the list.

num_referencing_filters: number

The number of filters referencing the list.

description?: string

An informative summary of the list.

maxLength500
ListCreateResponse { id, created_on, kind, 5 more }
id: string

The unique ID of the list.

maxLength32
minLength32
created_on: string

The RFC 3339 timestamp of when the list was created.

kind: "ip" | "redirect" | "hostname" | "asn"

The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects).

One of the following:
"ip"
"redirect"
"hostname"
"asn"
modified_on: string

The RFC 3339 timestamp of when the list was last modified.

name: string

An informative name for the list. Use this name in filter and rule expressions.

maxLength50
num_items: number

The number of items in the list.

num_referencing_filters: number

The number of filters referencing the list.

description?: string

An informative summary of the list.

maxLength500
ListUpdateResponse { id, created_on, kind, 5 more }
id: string

The unique ID of the list.

maxLength32
minLength32
created_on: string

The RFC 3339 timestamp of when the list was created.

kind: "ip" | "redirect" | "hostname" | "asn"

The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects).

One of the following:
"ip"
"redirect"
"hostname"
"asn"
modified_on: string

The RFC 3339 timestamp of when the list was last modified.

name: string

An informative name for the list. Use this name in filter and rule expressions.

maxLength50
num_items: number

The number of items in the list.

num_referencing_filters: number

The number of filters referencing the list.

description?: string

An informative summary of the list.

maxLength500
ListDeleteResponse { id }
id: string

The unique ID of the list.

maxLength32
minLength32

ListsBulk Operations

Get bulk operation status
client.rules.lists.bulkOperations.get(stringoperationId, BulkOperationGetParams { account_id } params, RequestOptionsoptions?): BulkOperationGetResponse
GET/accounts/{account_id}/rules/lists/bulk_operations/{operation_id}
ModelsExpand Collapse
BulkOperationGetResponse = ListsBulkOperationPendingOrRunning { id, status } | ListsBulkOperationCompleted { id, completed, status } | ListsBulkOperationFailed { id, completed, error, status }
One of the following:
ListsBulkOperationPendingOrRunning { id, status }
id: string

The unique operation ID of the asynchronous action.

status: "pending" | "running"

The current status of the asynchronous operation.

One of the following:
"pending"
"running"
ListsBulkOperationCompleted { id, completed, status }
id: string

The unique operation ID of the asynchronous action.

completed: string

The RFC 3339 timestamp of when the operation was completed.

status: "completed"

The current status of the asynchronous operation.

ListsBulkOperationFailed { id, completed, error, status }
id: string

The unique operation ID of the asynchronous action.

completed: string

The RFC 3339 timestamp of when the operation was completed.

error: string

A message describing the error when the status is failed.

status: "failed"

The current status of the asynchronous operation.

ListsItems

Get list items
client.rules.lists.items.list(stringlistId, ItemListParams { account_id, cursor, per_page, search } params, RequestOptionsoptions?): CursorPaginationAfter<ItemListResponse>
GET/accounts/{account_id}/rules/lists/{list_id}/items
Get a list item
client.rules.lists.items.get(stringlistId, stringitemId, ItemGetParams { account_id } params, RequestOptionsoptions?): ItemGetResponse
GET/accounts/{account_id}/rules/lists/{list_id}/items/{item_id}
Create list items
client.rules.lists.items.create(stringlistId, ItemCreateParams { account_id, body } params, RequestOptionsoptions?): ItemCreateResponse { operation_id }
POST/accounts/{account_id}/rules/lists/{list_id}/items
Update all list items
client.rules.lists.items.update(stringlistId, ItemUpdateParams { account_id, body } params, RequestOptionsoptions?): ItemUpdateResponse { operation_id }
PUT/accounts/{account_id}/rules/lists/{list_id}/items
Delete list items
client.rules.lists.items.delete(stringlistId, ItemDeleteParams { account_id, items } params, RequestOptionsoptions?): ItemDeleteResponse { operation_id }
DELETE/accounts/{account_id}/rules/lists/{list_id}/items
ModelsExpand Collapse
ListCursor { after, before }
after?: string
before?: string
ListItem { operation_id }
operation_id: string

The unique operation ID of the asynchronous action.

ItemListResponse = ListsListItemIPFull { id, created_on, ip, 2 more } | ListsListItemHostnameFull { id, created_on, hostname, 2 more } | ListsListItemRedirectFull { id, created_on, modified_on, 2 more } | ListsListItemASNFull { id, asn, created_on, 2 more }
One of the following:
ListsListItemIPFull { id, created_on, ip, 2 more }
id: string

Defines the unique ID of the item in the List.

maxLength32
minLength32
created_on: string

The RFC 3339 timestamp of when the list was created.

ip: string

An IPv4 address, an IPv4 CIDR, an IPv6 address, or an IPv6 CIDR.

modified_on: string

The RFC 3339 timestamp of when the list was last modified.

comment?: string

Defines an informative summary of the list item.

ListsListItemHostnameFull { id, created_on, hostname, 2 more }
id: string

Defines the unique ID of the item in the List.

maxLength32
minLength32
created_on: string

The RFC 3339 timestamp of when the list was created.

hostname: Hostname { url_hostname, exclude_exact_hostname }

Valid characters for hostnames are ASCII(7) letters from a to z, the digits from 0 to 9, wildcards (*), and the hyphen (-).

modified_on: string

The RFC 3339 timestamp of when the list was last modified.

comment?: string

Defines an informative summary of the list item.

ListsListItemRedirectFull { id, created_on, modified_on, 2 more }
id: string

Defines the unique ID of the item in the List.

maxLength32
minLength32
created_on: string

The RFC 3339 timestamp of when the list was created.

modified_on: string

The RFC 3339 timestamp of when the list was last modified.

redirect: Redirect { source_url, target_url, include_subdomains, 4 more }

The definition of the redirect.

comment?: string

Defines an informative summary of the list item.

ListsListItemASNFull { id, asn, created_on, 2 more }
id: string

Defines the unique ID of the item in the List.

maxLength32
minLength32
asn: number

Defines a non-negative 32 bit integer.

created_on: string

The RFC 3339 timestamp of when the list was created.

modified_on: string

The RFC 3339 timestamp of when the list was last modified.

comment?: string

Defines an informative summary of the list item.

ItemGetResponse = ListsListItemIPFull { id, created_on, ip, 2 more } | ListsListItemHostnameFull { id, created_on, hostname, 2 more } | ListsListItemRedirectFull { id, created_on, modified_on, 2 more } | ListsListItemASNFull { id, asn, created_on, 2 more }
One of the following:
ListsListItemIPFull { id, created_on, ip, 2 more }
id: string

Defines the unique ID of the item in the List.

maxLength32
minLength32
created_on: string

The RFC 3339 timestamp of when the list was created.

ip: string

An IPv4 address, an IPv4 CIDR, an IPv6 address, or an IPv6 CIDR.

modified_on: string

The RFC 3339 timestamp of when the list was last modified.

comment?: string

Defines an informative summary of the list item.

ListsListItemHostnameFull { id, created_on, hostname, 2 more }
id: string

Defines the unique ID of the item in the List.

maxLength32
minLength32
created_on: string

The RFC 3339 timestamp of when the list was created.

hostname: Hostname { url_hostname, exclude_exact_hostname }

Valid characters for hostnames are ASCII(7) letters from a to z, the digits from 0 to 9, wildcards (*), and the hyphen (-).

modified_on: string

The RFC 3339 timestamp of when the list was last modified.

comment?: string

Defines an informative summary of the list item.

ListsListItemRedirectFull { id, created_on, modified_on, 2 more }
id: string

Defines the unique ID of the item in the List.

maxLength32
minLength32
created_on: string

The RFC 3339 timestamp of when the list was created.

modified_on: string

The RFC 3339 timestamp of when the list was last modified.

redirect: Redirect { source_url, target_url, include_subdomains, 4 more }

The definition of the redirect.

comment?: string

Defines an informative summary of the list item.

ListsListItemASNFull { id, asn, created_on, 2 more }
id: string

Defines the unique ID of the item in the List.

maxLength32
minLength32
asn: number

Defines a non-negative 32 bit integer.

created_on: string

The RFC 3339 timestamp of when the list was created.

modified_on: string

The RFC 3339 timestamp of when the list was last modified.

comment?: string

Defines an informative summary of the list item.

ItemCreateResponse { operation_id }
operation_id: string

The unique operation ID of the asynchronous action.

ItemUpdateResponse { operation_id }
operation_id: string

The unique operation ID of the asynchronous action.

ItemDeleteResponse { operation_id }
operation_id: string

The unique operation ID of the asynchronous action.