Skip to content
Start here

Lists

Get lists
client.Rules.Lists.List(ctx, query) (*SinglePage[ListsList], error)
GET/accounts/{account_id}/rules/lists
Get a list
client.Rules.Lists.Get(ctx, listID, query) (*ListGetResponse, error)
GET/accounts/{account_id}/rules/lists/{list_id}
Create a list
client.Rules.Lists.New(ctx, params) (*ListNewResponse, error)
POST/accounts/{account_id}/rules/lists
Update a list
client.Rules.Lists.Update(ctx, listID, params) (*ListUpdateResponse, error)
PUT/accounts/{account_id}/rules/lists/{list_id}
Delete a list
client.Rules.Lists.Delete(ctx, listID, body) (*ListDeleteResponse, error)
DELETE/accounts/{account_id}/rules/lists/{list_id}
ModelsExpand Collapse
type Hostname struct{…}

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

URLHostname string
ExcludeExactHostname booloptional

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.

type ListsList struct{…}
ID string

The unique ID of the list.

maxLength32
minLength32
CreatedOn string

The RFC 3339 timestamp of when the list was created.

Kind ListsListKind

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

One of the following:
const ListsListKindIP ListsListKind = "ip"
const ListsListKindRedirect ListsListKind = "redirect"
const ListsListKindHostname ListsListKind = "hostname"
const ListsListKindASN ListsListKind = "asn"
ModifiedOn 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
NumItems float64

The number of items in the list.

NumReferencingFilters float64

The number of filters referencing the list.

Description stringoptional

An informative summary of the list.

maxLength500
type Redirect struct{…}

The definition of the redirect.

SourceURL string
TargetURL string
IncludeSubdomains booloptional
PreservePathSuffix booloptional
PreserveQueryString booloptional
StatusCode RedirectStatusCodeoptional
One of the following:
const RedirectStatusCode301 RedirectStatusCode = 301
const RedirectStatusCode302 RedirectStatusCode = 302
const RedirectStatusCode307 RedirectStatusCode = 307
const RedirectStatusCode308 RedirectStatusCode = 308
SubpathMatching booloptional

ListsBulk Operations

Get bulk operation status
client.Rules.Lists.BulkOperations.Get(ctx, operationID, query) (*ListBulkOperationGetResponse, error)
GET/accounts/{account_id}/rules/lists/bulk_operations/{operation_id}

ListsItems

Get list items
client.Rules.Lists.Items.List(ctx, listID, params) (*CursorPaginationAfter[ListItemListResponse], error)
GET/accounts/{account_id}/rules/lists/{list_id}/items
Get a list item
client.Rules.Lists.Items.Get(ctx, listID, itemID, query) (*ListItemGetResponse, error)
GET/accounts/{account_id}/rules/lists/{list_id}/items/{item_id}
Create list items
client.Rules.Lists.Items.New(ctx, listID, params) (*ListItemNewResponse, error)
POST/accounts/{account_id}/rules/lists/{list_id}/items
Update all list items
client.Rules.Lists.Items.Update(ctx, listID, params) (*ListItemUpdateResponse, error)
PUT/accounts/{account_id}/rules/lists/{list_id}/items
Delete list items
client.Rules.Lists.Items.Delete(ctx, listID, params) (*ListItemDeleteResponse, error)
DELETE/accounts/{account_id}/rules/lists/{list_id}/items
ModelsExpand Collapse
type ListCursor struct{…}
After stringoptional
Before stringoptional
type ListItem struct{…}
OperationID string

The unique operation ID of the asynchronous action.