Update Firewall Condition
Edit a condition's value, operator, or negate flag. The type can also be changed but you typically delete + recreate when switching match category — operators don't translate cleanly across categories.
Path parameters
id string (uuid) Req
Policy UUID.
condition_id string (uuid) Req
Condition UUID.
Request body
Same fields as create: type, operator, key, value, negate. The condition is replaced wholesale.
Response (200 OK)
Updated condition.
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.
Request
curl -X PUT "https://api.ngris.com/v1/firewall/policies/abc-123/conditions/cond-1" \
-H "X-API-KEY: <your_api_key>" \
-H "Content-Type: application/json" \
-d '{
"type": "country",
"operator": "in",
"value": "RU,KP,IR,BY",
"negate": false
}'
Python
from ngris import Ngris
client = Ngris(api_key="<your_api_key>")
client.firewall.update_condition("abc-123", "cond-1", {
"type": "country", "operator": "in", "value": "RU,KP,IR,BY",
})
Response — 200 OK
{
"id": "cond-1",
"type": "country",
"operator": "in",
"value": "RU,KP,IR,BY",
"negate": false
}