Version 2.1.1792967583 · latest Download OpenAPI Markdown

Site IP lists

Permanent IP blacklist and whitelist of one site; blacklisted IPs are dropped and whitelisted IPs skip CC and other protections. The site's temporary whitelist on nodes can also be cleared.

site-ip-listsProtectionAuthentication: User (some parameters admin only)7 endpoints

Get site IP blacklist and whitelist

GET/api/v2/site-ip-lists/{site_id}
Authentication: User (some parameters admin only)

Set site IP blacklist and whitelist

PUT/api/v2/site-ip-lists/{site_id}
Authentication: User (some parameters admin only)

Request body application/json

FieldTypeRequiredDescription
blackstring[]— Permanent blacklist (a match = connection dropped); the count is limited by protect.black_ip_max.
black_itemsIpListItem[]— Blacklist entries with expiry, reason and source; expired entries are not returned.
expected_updated_atstring— Optimistic lock - the updated_at as the caller read it (when the read updated_at is null, i.e. never set, use 1970-01-01T00:00:00Z). If it differs from the stored one, 409 stale_version is returned and nothing is saved; omit to skip the check.
whitestring[]— Permanent whitelist (a match = CC and other protections are skipped); the count is limited by protect.white_ip_max.
white_itemsIpListItem[]— Whitelist entries with expiry, reason and source; expired entries are not returned.

Export site IP list entries

GET/api/v2/site-ip-lists/{site_id}/export
Authentication: User (some parameters admin only)

Query parameters

FieldTypeRequiredDescription
liststringRequired Which list to export.
Values ["black","white"]
sourceIpListSource— Only export entries from this source; omit for all.
Values ["manual","import","ip_detail","api"]
formatstring— txt (default, one entry per line) or csv (with header, a source column and a UTF-8 BOM).
Values ["txt","csv"]Default "txt"

Bulk import site IP list entries

POST/api/v2/site-ip-lists/{site_id}/import
Authentication: User (some parameters admin only)

Request body application/json

FieldTypeRequiredDescription
dry_runboolean— true only checks the file and saves nothing.
Default false
expected_updated_atstring— Optimistic lock - the updated_at as the caller read it (when the read updated_at is null, i.e. never set, use 1970-01-01T00:00:00Z). If it differs from the stored one, 409 stale_version is returned and nothing is saved; omit to skip the check.
liststringRequired Which list to import into.
Values ["black","white"]
modestring— merge adds to the current list (the imported row wins for the same IP); replace swaps the whole list for the imported rows.
Values ["merge","replace"]Default "merge"
textstringRequired File content (txt/csv), one entry per line: IP/CIDR[,expiry][,reason].

IP detail

GET/api/v2/site-ip-lists/{site_id}/ip-detail
Authentication: User (some parameters admin only)

Query parameters

FieldTypeRequiredDescription
ipstringRequired IPv4 or IPv6 address.

Blacklist or whitelist from IP detail

POST/api/v2/site-ip-lists/{site_id}/ip-detail
Authentication: User (some parameters admin only)

Request body application/json

FieldTypeRequiredDescription
expires_atstring— Expiry time; empty = permanent. Must be in the future.
ipstringRequired Normalized address (IPv4-mapped addresses shown as IPv4).
liststringRequired Which list to import into.
Values ["black","white"]
reasonstring— Reason (note), at most 200 characters.
scopestringRequired site = this site's list; global = the global list (admins only).
Values ["site","global"]

Clear site temporary whitelist

POST/api/v2/site-ip-lists/{site_id}/tmp-white-clear
Authentication: User (some parameters admin only)

Site IP lists object

FieldTypeRequiredDescription
addedinteger— Entries added.
appliedboolean— Whether the import was saved (false for dry_run or when blocking issues exist).
blackstring[]— Permanent blacklist (a match = connection dropped); the count is limited by protect.black_ip_max.
black_itemsIpListItem[]— Blacklist entries with expiry, reason and source; expired entries are not returned.
block_deniedstring— Why it cannot be blacklisted: private (private/loopback/link-local), node (a node IP; admins only), self (the caller's own IP), other (any other reason; tenants get this for node IPs so node addresses are not revealed); omitted when allowed.
Values ["private","node","self","other"]
dry_runboolean— true only checks the file and saves nothing.
Default false
expected_updated_atstring— Optimistic lock - the updated_at as the caller read it (when the read updated_at is null, i.e. never set, use 1970-01-01T00:00:00Z). If it differs from the stored one, 409 stale_version is returned and nothing is saved; omit to skip the check.
expires_atstring— Expiry time; empty = permanent. Must be in the future.
geoGeoipLookup— IP geolocation lookup result.
global_blackIpListItem— IP list entry (in IP details, the entry that matches the IP; omitted when none matches).
global_whiteIpListItem— IP list entry (in IP details, the entry that matches the IP; omitted when none matches).
ipstring— Normalized address (IPv4-mapped addresses shown as IPv4).
issuesIpListImportIssue[]— Per-line issues (at most 1000, ascending by line).
linesinteger— Number of valid entries (after de-duplication).
liststringRequired Which list to import into.
Values ["black","white"]
modestring— merge adds to the current list (the imported row wins for the same IP); replace swaps the whole list for the imported rows.
Values ["merge","replace"]Default "merge"
reasonstring— Reason (note), at most 200 characters.
removedinteger— In replace mode, existing entries that are not in the new list (entries with the same IP count as updated, not removed).
scopestringRequired site = this site's list; global = the global list (admins only).
Values ["site","global"]
site_blackIpListItem— IP list entry (in IP details, the entry that matches the IP; omitted when none matches).
site_idinteger— Site ID
read-only
site_whiteIpListItem— IP list entry (in IP details, the entry that matches the IP; omitted when none matches).
task_idinteger— Id of the background task that pushes the change to nodes (poll progress with GET /tasks/{id}).
textstringRequired File content (txt/csv), one entry per line: IP/CIDR[,expiry][,reason].
updatedinteger— Entries already in the list that were updated by the import.
updated_atstring— Updated at
read-only
whitestring[]— Permanent whitelist (a match = CC and other protections are skipped); the count is limited by protect.white_ip_max.
white_itemsIpListItem[]— Whitelist entries with expiry, reason and source; expired entries are not returned.