List Traffic Policies

GET /v1/endpoints/{uuid}/policies

List the traffic policies attached to an endpoint. A traffic policy is a named container for one or more rules that the platform's edge runs against requests passing through the endpoint — IP allow-lists, rate limits, header injection, response caching, custom redirects, JWT validation, etc.

Policies are evaluated in priority order (lowest first). Within a policy, rules are scoped to a phase (TCP-connect, UDP-connect, HTTP-request, HTTP-response). The first rule whose expression matches fires; subsequent rules in the same phase are skipped per the standard chained-evaluation model.

Path parameters

uuid string (uuid) Req
Endpoint UUID.

Response (200 OK)

An object with a policies array. Each policy carries its full rules array (populated server-side for every policy in the list):

id int64
Numeric policy ID.
endpoint_id int64
Owning endpoint.
name, description string
Free-form metadata. Shown in the dashboard policy list.
enabled boolean
false skips this policy at evaluation time without deleting it.
priority int
Lower runs earlier. Pick wide gaps (10, 20, 30) to leave room for new policies.
rules array
Rules attached to this policy, each with id, policy_id, phase, rule_type, name, expression, config, priority, enabled. See GET /v1/policies/{policy_id} for the per-rule field detail.
created_at, updated_at datetime
RFC 3339 UTC.

Errors

401 Unauthorized
Missing auth.
404 Not Found
Endpoint doesn't exist or doesn't belong to the calling user.
Request
curl "https://api.ngris.com/v1/endpoints/<uuid>/policies" \ -H "X-API-KEY: <your_api_key>"
Python
from ngris import Ngris client = Ngris(api_key="<your_api_key>") for p in client.traffic_policies.list("<endpoint_uuid>"): print(f"[{p['priority']:>3}] {p['name']} ({len(p.get('rules', []))} rules)")
Response — 200 OK
{ "policies": [ { "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", "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
List Traffic Policies
Iris