Update Firewall Policy
Edit policy metadata: name, description, action, priority, enabled flag. Conditions are managed separately via /policies/{id}/conditions endpoints — this call doesn't touch them.
Changes take effect on the next request — no caching window. Toggling enabled is the right knob for staged rollouts: configure conditions, verify on a non-production endpoint, then flip true.
Path parameters
id string (uuid) Req
Policy UUID.
Request body
Same fields as create: name, description, action, priority, enabled. Pass any subset; omitted fields keep their existing value. (A non-empty name, a non-nil description, an action of allow/block, a non-negative priority, or an enabled flag each overwrite the current value when present.)
Response (200 OK)
The updated policy.
Errors
400 Bad Request
Invalid
action, missing fields, invalid JSON.401 Unauthorized
Missing auth.
403 Forbidden
Plan doesn't include
firewall_policies.404 Not Found
Policy doesn't exist.
Request
curl -X PUT "https://api.ngris.com/v1/firewall/policies/abc-123" \
-H "X-API-KEY: <your_api_key>" \
-H "Content-Type: application/json" \
-d '{"enabled": true, "priority": 5}'
Python
from ngris import Ngris
client = Ngris(api_key="<your_api_key>")
client.firewall.update_policy("abc-123", {"enabled": True, "priority": 5})
Response — 200 OK
{
"id": "abc-123",
"name": "block-known-bad-ips",
"action": "block",
"priority": 5,
"enabled": true
}