Update Traffic Policy

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

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
The endpoint's uuid from /endpoints.
policy_uuid string (uuid) Req
The policy's uuid from the policy list. Resolved under this endpoint only.

Deprecated: the legacy integer id is still accepted in the path until the sunset, answered with Deprecation and Sunset headers. Use the uuid.

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 (same shape as a list entry).

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

400 Bad Request
Invalid JSON, unknown body fields (strict decoding), or an integer policy id after the sunset (integer_id_unsupported).
401 Unauthorized
Missing auth.
403 Forbidden
Plan doesn't include traffic_policies.
404 Not Found
Endpoint doesn't exist (Endpoint not found), or the policy isn't one of this endpoint's (Policy not found).
Request — temporarily disable
curl -X PUT "https://api.ngris.com/v1/endpoints/019bb1e4-e785-77d2-9966-c3cff31d0a0e/policies/019b74e7-6fe8-7784-9d8a-9b7f9cb99a89" \ -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( "019bb1e4-e785-77d2-9966-c3cff31d0a0e", "019b74e7-6fe8-7784-9d8a-9b7f9cb99a89", {"name": "rate-limit", "enabled": False, "priority": 10}, )
Response — 200 OK
{ "uuid": "019b74e7-6fe8-7784-9d8a-9b7f9cb99a89", "endpoint_uuid": "019bb1e4-e785-77d2-9966-c3cff31d0a0e", "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" }
Was this helpful?
On this page
Update Traffic Policy
Was this helpful?