Update Traffic Policy

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

Edit a policy's metadata (name, description, priority, enabled flag). Only the fields you send take effect: a non-empty name or description overwrites the stored value, and enabled/priority are applied when present (they are nullable in the request — omit them to leave the current value untouched). Rules are not affected by this call; use the per-rule update endpoints for those.

Toggling enabled is the right knob to temporarily disable a whole policy without removing its rules.

Path parameters

uuid string (uuid) Req
Endpoint UUID.
policy_id int64 Req
Policy ID.

Request body

Same fields as create: name, description, enabled, priority. A non-empty name is required only if you intend to change it — an empty/omitted name leaves the existing value in place. Strict decoding rejects unknown fields.

Response (200 OK)

The updated policy.

Errors

400 Bad Request
Invalid JSON, unknown body fields (strict decoding), or non-numeric policy_id.
401 Unauthorized
Missing auth.
403 Forbidden
Plan doesn't include traffic_policies.
404 Not Found
Endpoint or policy doesn't exist.
Request — temporarily disable
curl -X PUT "https://api.ngris.com/v1/endpoints/<uuid>/policies/1" \ -H "X-API-KEY: <your_api_key>" \ -H "Content-Type: application/json" \ -d '{ "name": "rate-limit", "description": "Disabled while investigating", "enabled": false, "priority": 10 }'
Python
from ngris import Ngris client = Ngris(api_key="<your_api_key>") client.traffic_policies.update( "<endpoint_uuid>", "1", {"name": "rate-limit", "enabled": False, "priority": 10}, )
Response — 200 OK
{ "id": 1, "endpoint_id": 184, "name": "rate-limit", "description": "Disabled while investigating", "enabled": false, "priority": 10, "created_at": "2026-04-01T00:00:00Z", "updated_at": "2026-04-29T13:05:00Z" }
On this page
Update Traffic Policy
Iris