POST /v1/tenants/{tenant_id}/permissions/expand
The Expand API retrieves all subjects (users and user sets) that have a relationship or attribute granting the requested permission on the given entity. The response is a user set tree — a recursive structure whose leaf nodes are user IDs or pointers to other <object#relation> pairs.
Path Parameters
The tenant identifier. Use
t1 for single-tenant deployments. Must match ^([a-zA-Z0-9_\-@\.:+]{1,128}|\*)$.Request Body
The entity whose permission tree is being expanded.
The permission or relation to expand. Must match
^[a-zA-Z_]{1,64}$.Contextual data for this request.
Response
The expanded permission tree. Leaf nodes contain user IDs; intermediate nodes represent set operations (
union, intersection, exclusion) or indirect references to other entity-relation pairs.Example
Error Codes
| HTTP Status | Description |
|---|---|
400 | Bad request — invalid fields |
401 | Unauthorized |
404 | Tenant not found |
429 | Rate limit exceeded |
500 | Internal server error |