Add Firewall Condition
Attach a match condition to a firewall policy. Each condition in a policy carries a logical_operator (AND or OR) that controls how it composes with the next condition — see below.
Conditions match on request attributes: source_ip / CIDR, country and asn (both derived from the source IP via the platform's geolocation feed, refreshed daily), browser, user_agent, endpoint (the endpoint’s uuid), path, method, header, cookie, protocol (http / tcp / udp), and port. Note protocol / port apply at the transport layer, so they also gate raw TCP/UDP tunnels — not just HTTP.
Path parameters
Request body
source_ip / protocol / port / method accept equals / in / not_in; free-form string fields path / endpoint add contains / starts_with / ends_with / regex; and the optionally-present fields header / cookie / user_agent / browser / country / asn additionally allow exists / not_exists (country / asn take equals / in / not_in / exists / not_exists). Case-insensitive; stored lowercased.operator: "in" ("RU,KP,IR"). Format per type: country = ISO 3166-1 alpha-2; asn = AS number (AS15169 or 15169); protocol = http / tcp / udp; port = 1–65535; method = HTTP verb (uppercased); source_ip = IP or CIDR; endpoint = the endpoint's uuid from GET /v1/endpoints (a list for in / not_in; a legacy integer endpoint id of your own endpoint is stored and returned as its uuid; a hostname is stored as typed and matches nothing); regex values are full Go regexp syntax. Empty value is allowed only for exists / not_exists.AND (default) or OR. Connects this condition to the NEXT condition in the policy's evaluation order. Sequence is left-to-right: cond1 [op1] cond2 [op2] cond3 .... Stored upper-cased.Response (201 Created)
The new condition, appended last in the policy's evaluation order, with the fields described in list: uuid, policy_uuid, condition_type, operator, condition_value (stored form: an in list is joined with ", "), logical_operator, created_at, and id / policy_id (the same uuids).
Errors
type / operator combination, malformed regex, malformed CIDR, or invalid JSON.