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
| Header | Value |
|---|---|
Authorization | Bearer <token> |
Content-Type | application/json |
Request Body
Pass an array of role identifiers whose permissions should be merged and returned.
| Field | Type | Required | Description |
|---|---|---|---|
roles | array | Yes | Array 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
| Header | Description |
|---|---|
X-Total-Count | Total number of permissions returned. |
Response Body
Array of permission ID strings.
Example Response
[
"usermanagement.read",
"importer.read",
"search.read"
]
