Get Firewall Policy
Read the full policy record including its conditions array. Use this to inspect a policy's logic before editing or to render the conditions editor in a dashboard.
Path parameters
id string (uuid) Req
Policy UUID.
Response (200 OK)
Same shape as list entries, with the conditions array always included:
conditions array
All conditions on this policy. Each:
{id, policy_id, condition_type, operator, condition_value, logical_operator, created_at}. condition_type is one of source_ip, country, asn, browser, user_agent, endpoint, path, method, header, cookie, protocol, port. operator is one of equals, contains, starts_with, ends_with, regex, in, not_in, exists, not_exists (the set valid for a given type is constrained — see create). logical_operator is the outgoing connector to the next condition: AND or OR.Errors
400 Bad Request
Missing
id.401 Unauthorized
Missing auth.
404 Not Found
Policy doesn't exist or doesn't belong to the calling user.
Request
curl "https://api.ngris.com/v1/firewall/policies/abc-123" \
-H "X-API-KEY: <your_api_key>"
Python
from ngris import Ngris
client = Ngris(api_key="<your_api_key>")
policy = client.firewall.get_policy("abc-123")
for c in policy["conditions"]:
print(f" {c['condition_type']} {c['operator']} {c['condition_value']}")
Response — 200 OK
{
"id": "abc-123",
"name": "block-known-bad-ips",
"action": "block",
"priority": 10,
"enabled": true,
"conditions": [
{"id": "cond-1", "policy_id": "abc-123", "condition_type": "source_ip",
"operator": "in", "condition_value": "1.2.3.0/24", "logical_operator": "AND",
"created_at": "2026-04-29T13:00:00Z"},
{"id": "cond-2", "policy_id": "abc-123", "condition_type": "protocol",
"operator": "equals", "condition_value": "tcp", "logical_operator": "AND",
"created_at": "2026-04-29T13:00:00Z"}
]
}