Preview effective permissions

Returns the effective (merged) set of permissions for a given combination of roles. Useful for previewing what permissions a user would have before assigning roles.

Requires authentication.

Request

POST /permissions/preview

Headers

HeaderValue
AuthorizationBearer <token>
Content-Typeapplication/json

Request Body

Pass an array of role identifiers whose permissions should be merged and returned.

FieldTypeRequiredDescription
rolesarrayYesArray of role ID strings to evaluate.

Example Request

POST /permissions/preview
Authorization: Bearer <token>
Content-Type: application/json

{
  "roles": ["role-abc123", "role-def456"]
}

Response

Returns a deduplicated JSON array of permission identifiers that apply to the given roles. The X-Total-Count header contains the number of permissions.

Response Headers

HeaderDescription
X-Total-CountTotal number of permissions returned.

Response Body

Array of permission ID strings.

Example Response

[
  "usermanagement.read",
  "importer.read",
  "search.read"
]