GET /api/roles/
Retrieves detailed information about a specific role, including all assigned permissions.
Authentication
This endpoint requires authentication. Include a valid JWT token in the Authorization header.
Path Parameters
The unique identifier of the role to retrieve
Response
Unique identifier of the role
The description of the role
List of permissions assigned to this rolePermission unique identifier
Permission status (ACTIVE, INACTIVE)
Current status of the role (ACTIVE, INACTIVE)
Error Responses
- 404 Not Found: Role with the specified ID does not exist
- 500 Internal Server Error: Unexpected server error
Example Request
curl -X GET https://api.example.com/api/roles/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
Example Response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Administrator",
"description": "Full system access with all permissions",
"permissions": [
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"name": "users:write",
"description": "Permission to create and modify users",
"status": "ACTIVE"
},
{
"id": "660e8400-e29b-41d4-a716-446655440002",
"name": "users:read",
"description": "Permission to view user information",
"status": "ACTIVE"
}
],
"status": "ACTIVE"
}
Example Error Response
{
"timestamp": "2024-01-15T10:30:00Z",
"requestId": "abc-123-def",
"message": "Role not found",
"detail": "No role exists with ID: 550e8400-e29b-41d4-a716-446655440000"
}