Version 2.1.1792967583 · latest Download OpenAPI Markdown

Global IP lists

Platform-wide IP blacklist and whitelist with optional expiry, reason and source per entry, plus bulk import and export; admin only.

global-ip-listsProtectionAuthentication: Admin only4 endpoints

Get global IP blacklist and whitelist

GET/api/v2/global-ip-lists
Authentication: Admin only

Set global IP blacklist and whitelist

PUT/api/v2/global-ip-lists
Authentication: Admin only

Request body application/json

FieldTypeRequiredDescription
blackstring[]— IP/CIDR of the unexpired blacklist entries.
black_itemsIpListItem[]— Blacklist entries with expiry, reason and source.
expected_updated_atstring— Optimistic lock - the updated_at as the caller read it (use 1970-01-01T00:00:00Z when it was null). If it differs from the stored one, 409 stale_version is returned and nothing is saved; omit to skip the check.
whitestring[]— IP/CIDR of the unexpired whitelist entries.
white_itemsIpListItem[]— Whitelist entries with expiry, reason and source.

Export global IP list entries

GET/api/v2/global-ip-lists/export
Authentication: 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 global IP list entries

POST/api/v2/global-ip-lists/import
Authentication: 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 (use 1970-01-01T00:00:00Z when it was null). 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].

Global IP lists object

FieldTypeRequiredDescription
addedinteger— Entries added.
appliedboolean— Whether the import was saved (false for dry_run or when blocking issues exist).
blackstring[]— IP/CIDR of the unexpired blacklist entries.
black_itemsIpListItem[]— Blacklist entries with expiry, reason and source.
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 (use 1970-01-01T00:00:00Z when it was null). If it differs from the stored one, 409 stale_version is returned and nothing is saved; omit to skip the check.
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"
removedinteger— In replace mode, existing entries that are not in the new list (entries with the same IP count as updated, not removed).
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[]— IP/CIDR of the unexpired whitelist entries.
white_itemsIpListItem[]— Whitelist entries with expiry, reason and source.