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
The endpoint's uuid from /endpoints.

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):

uuid string (uuid)
The policy's public id. Use it as {policy_uuid} in the policy and rule routes.
endpoint_uuid string (uuid)
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 uuid, policy_uuid, phase, rule_type, name, expression, config, priority, enabled. See GET .../policies/{policy_uuid} for the per-rule field detail. A verify-webhook or jwt-validation rule's config.secret is write-only: a saved secret reads "****", never the value (an empty one stays empty). To keep it, send **** back on a rule update.
created_at, updated_at datetime
RFC 3339 UTC.

Deprecated: until the sunset this response also carries the legacy integer id and *_id fields. Don't use them; read uuid and the *_uuid fields.

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/019bb1e4-e785-77d2-9966-c3cff31d0a0e/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("019bb1e4-e785-77d2-9966-c3cff31d0a0e"): print(f"[{p['priority']:>3}] {p['name']} ({len(p.get('rules', []))} rules)")
Response — 200 OK
{ "policies": [ { "uuid": "019b74e7-6fe8-7784-9d8a-9b7f9cb99a89", "endpoint_uuid": "019bb1e4-e785-77d2-9966-c3cff31d0a0e", "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": [ { "uuid": "019b7fe5-336a-7789-aeab-182ddfcd5711", "policy_uuid": "019b74e7-6fe8-7784-9d8a-9b7f9cb99a89", "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" } ] } ] }
Was this helpful?
On this page
List Traffic Policies
Was this helpful?