Update Firewall Condition
Replace a condition's type, operator, value and logical operator. Its place in the policy's evaluation order stays the same.
Path parameters
uuid string (uuid) Req
condition_uuid string (uuid) Req
The condition's
uuid (= its id) from the policy's conditions. Resolved only under the policy in the path.Request body
Same fields as create: type and operator (required), value, logical_operator. The condition is replaced wholesale: a logical_operator you leave out becomes AND. Other fields are ignored.
Response (200 OK)
The updated condition, with the fields described in list.
Errors
400 Bad Request
Invalid type/operator combination, malformed value, invalid JSON.
401 Unauthorized
Missing auth.
404 Not Found
Policy or condition doesn't exist (a condition resolves only under its own policy), belongs to another account, or a path segment isn't a uuid.
Request
curl -X PUT "https://api.ngris.com/v1/firewall/policies/019c32cb-35d7-786f-b2c5-d108951e23d8/conditions/019c4790-e565-733a-8f1b-52bc76befe65" \
-H "X-API-KEY: <your_api_key>" \
-H "Content-Type: application/json" \
-d '{
"type": "country",
"operator": "in",
"value": "RU,KP,IR,BY",
"logical_operator": "AND"
}'
Python
from ngris import Ngris
client = Ngris(api_key="<your_api_key>")
client.firewall.update_condition("019c32cb-35d7-786f-b2c5-d108951e23d8", "019c4790-e565-733a-8f1b-52bc76befe65", {
"type": "country", "operator": "in", "value": "RU,KP,IR,BY",
})
Response — 200 OK
{
"id": "019c4790-e565-733a-8f1b-52bc76befe65",
"policy_id": "019c32cb-35d7-786f-b2c5-d108951e23d8",
"uuid": "019c4790-e565-733a-8f1b-52bc76befe65",
"policy_uuid": "019c32cb-35d7-786f-b2c5-d108951e23d8",
"condition_type": "country",
"operator": "in",
"condition_value": "RU, KP, IR, BY",
"logical_operator": "AND",
"created_at": "2026-04-29T13:00:00Z"
}
Was this helpful?