Get Traffic Policy

GET /v1/endpoints/{uuid}/policies/{policy_id}

Read the full policy record including its rules array. Use this to inspect a policy before editing or to render the rules editor in a dashboard.

Path parameters

uuid string (uuid) Req
Endpoint UUID.
policy_id int64 Req
Numeric policy ID.

Response (200 OK)

Same shape as list entries plus:

rules array
All rules attached to this policy, ordered by priority. Each rule has id, phase, rule_type, name, expression (CEL filter), config (rule-type-specific JSON), priority, enabled.

Errors

400 Bad Request
Non-numeric policy_id.
401 Unauthorized
Missing auth.
404 Not Found
Endpoint or policy doesn't exist (or policy doesn't belong to this endpoint).
Request
curl "https://api.ngris.com/v1/endpoints/<uuid>/policies/1" \ -H "X-API-KEY: <your_api_key>"
Python
from ngris import Ngris client = Ngris(api_key="<your_api_key>") policy = client.traffic_policies.get("<endpoint_uuid>", "1") for rule in policy["rules"]: print(f" [{rule['priority']}] {rule['rule_type']}: {rule['name']}")
Response — 200 OK
{ "id": 1, "endpoint_id": 184, "name": "rate-limit", "description": "100 req/sec per client IP", "enabled": true, "priority": 10, "created_at": "2026-04-01T00:00:00Z", "updated_at": "2026-04-01T00:00:00Z", "rules": [ { "id": 7, "policy_id": 1, "phase": "on_http_request", "rule_type": "rate-limit", "name": "100rps", "expression": "true", "config": {"limit": 100, "window": 1, "scope": "ip"}, "priority": 0, "enabled": true, "created_at": "2026-04-01T00:00:00Z", "updated_at": "2026-04-01T00:00:00Z" } ] }
On this page
Get Traffic Policy
Iris