Skip to content

List active shell role grants for a user

GET
/api/users/{user_id}/roles
curl --request GET \
--url 'https://example.com/api/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/roles?organization_id=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \
--header 'Authorization: Bearer <token>'

Return all active (revoked_at IS NULL) shell role grants for user_id in org.

Requires OWNER or ADMIN tenancy role.

user_id
required
User Id
string format: uuid
organization_id
required
Organization Id
string format: uuid

Successful Response

Media type application/json
RoleListResponse

Paginated list of active role grants.

object
items
required
Items
Array<object>
object
key
additional properties
any
total
required
Total
integer
Example generated
{
"items": [
{}
],
"total": 1
}

Validation Error

Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Example generated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}