Rolesv1User Roles
List roles for a user
Handler: GetRolesByUserID. Returns []models.RoleResponse (NOT a single UserRole) for the user identified by the {id} path parameter. The authenticated (token) user is used only to scope RBAC visibility (ReadAll vs. permitted role IDs), not to select which user's roles are returned.
Authorization
bearerAuth AuthorizationBearer <token>
In: header
Path Parameters
id*string
Target user ID whose roles are listed
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/v1/user-roles/user/497f6eca-6276-4993-bfeb-53cbbbba6f08"[
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",
"title": "string",
"subtitle": "string",
"details": "string",
"created_at": "2019-08-24T14:15:22Z",
"created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
"modified_at": "2019-08-24T14:15:22Z",
"modified_by": "e8d4374d-93a1-4e98-a6c6-fdcf00c5059f",
"active": true,
"metadata": {}
}
]{
"status": 401,
"message": "Unauthorized"
}{
"status": 500,
"message": "server_error"
}