POST /v1/tenants/{tenant_id}/permissions/lookup-subject
Lookup Subject answers questions of the form: “Which users can edit document:1?” The response is a paginated array of subject IDs that satisfy the requested permission on the given entity.
Path Parameters
The tenant identifier. Use
t1 for single-tenant deployments. Must match ^([a-zA-Z0-9_\-@\.:+]{1,128}|\*)$.Request Body
The entity on which subjects’ permissions are evaluated.
The permission or relation to evaluate. Must match
^[a-zA-Z_]{1,64}$.Specifies the type of subject to look up.
Contextual data for this request.
Number of subject IDs to return per page. Must be
>= 1.Pagination token from the previous response. Omit for the first page.
Response
List of subject IDs that have the requested permission on the entity.
Pagination token for the next page. Empty when there are no more results.
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 |