Get all roles for a user
GET
/users/{id}/roles
Returns every role assigned to the user, including role metadata and the assignment's context.
Authorizations
BearerAuth
Authentication is handled automatically via httpOnly session cookies after signing in at /cognito/signin or via Google SSO at /cognito/oauth/google. For Swagger UI testing, paste a JWT token from the /cognito/signin response.
Type
HTTP (bearer)
Parameters
Path Parameters
id*
Type
Requiredstring
Responses
User roles
application/json
JSON
{
"roles": [
{
"id": "string",
"name": "string",
"display_name": "string",
"description": "string",
"hierarchy_level": 0,
"context_type": "string",
"context_id": "string",
"is_active": true
}
]
}