policies

Update policy

Recompiles the stored Rego source in place, same untrusted-code constraints as createPolicy. Write access is role-gated, not ownership-gated: tenant_write for the policy's own tenant, cross_tenant (admin) for a global one — the row's creator (created_by) is provenance only and grants no standing write access, unlike the normal "write your own row" baseline, because a policy is executable authorization logic other tenants may consume.

put/policies/{id}

Request

  • Base URL: https://api.instruxi.dev/api/v1/enforcer
  • URL: https://api.instruxi.dev/api/v1/enforcer/policies/{id}
  • Auth: one of:
    • API key in header Authorization
    • API key in header X-API-Key

Path parameters

idstring required

id

Request body

activeboolean

Active defaults to true on create; on update it is applied as given.

descriptionstring
namestring
sourcestring
tenant_idstring

TenantID targets a tenant-scoped policy (admin may target any tenant; a tenant_admin is always pinned to their own). Empty = a global policy (admin only).

Response

OK

successboolean

Example response

{
  "success": true
}

Changes

No recorded changes to this operation across all 1 revision of this API.