policies

List policies

Custom Rego policies visible to the caller: every GLOBAL policy (tenant_id null — world-readable by design) plus the caller's own tenant's policies. Does not include the built-in static policy.rego engine, which every request runs regardless. Filters only narrow that visibility; total counts the rows matching every filter. Policies are whole Rego modules: there is no per-policy resource_type or effect to filter on.

get/policies

Request

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

Query parameters

qstring

case-insensitive substring of name or description (never the Rego source)

activeboolean

only active (true) or inactive (false) policies; anything but true/false is 400 invalid_active

sort'name' | 'created' | 'updated'

sort field; absent keeps the default order (globals first, then name A-Z)

sort_dir'asc' | 'desc'

sort direction (id breaks ties in the same direction)

limitinteger

page size

offsetinteger

page offset

tenant_idstring uuid

list this tenant instead of your own (default: the caller's own tenant, platform admins included). Another tenant requires the cross_tenant grant — 403 otherwise

all_tenantsboolean

list EVERY tenant (platform-wide admin view). Requires the cross_tenant grant — 403 otherwise. Mutually exclusive with tenant_id (400 conflicting_tenant_scope)

Response

OK

limitinteger
offsetinteger
successboolean
totalinteger

Example response

{
  "success": true
}

Changes

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