Reorder Firewall Policies

POST /v1/firewall/policies/reorder

Bulk-rewrite the priorities of firewall policies in a single transaction. Pass an ordered list of policy uuids — the platform assigns priorities 1, 2, 3, … in that order (first uuid = priority 1 = runs first). Useful when the user drags policies around in the dashboard's policy list and you want a single atomic save.

Atomic — either every priority is updated or none is. Only uuids you pass are re-prioritised, and the update is scoped to the caller's account (uuids that don't belong to the account are silently skipped). Requires the firewall_policies entitlement.

Request body

ordered_uuids string[] (uuid) Req
Policy uuids in the desired priority order (first = priority 1 = runs first). Must be non-empty.

Deprecated: the old name ordered_ids (the same uuid strings) is still accepted. Send ordered_uuids; sending both in a different order is a 400 id_uuid_mismatch.

Response (200 OK)

success boolean
true on a successful reorder.

Errors

400 Bad Request
Empty ordered_uuids, invalid JSON, or ordered_ids and ordered_uuids both sent in a different order (id_uuid_mismatch).
401 Unauthorized
Missing auth.
403 Forbidden
Plan doesn't include firewall_policies.
Request
curl -X POST "https://api.ngris.com/v1/firewall/policies/reorder" \ -H "X-API-KEY: <your_api_key>" \ -H "Content-Type: application/json" \ -d '{"ordered_uuids": ["019c3cc3-7c1a-7c8d-81db-2120d6a39a23", "019c32cb-35d7-786f-b2c5-d108951e23d8"]}'
Python
from ngris import Ngris client = Ngris(api_key="<your_api_key>") client._post_raw("/firewall/policies/reorder", { "ordered_uuids": [ "019c3cc3-7c1a-7c8d-81db-2120d6a39a23", "019c32cb-35d7-786f-b2c5-d108951e23d8", ], })
Response — 200 OK
{ "success": true }
Was this helpful?
Was this helpful?