Get a paginated list of all active roles in the system
curl -X GET "https://api.maqagr.com/api/roles?page=1&limit=10" \ -H "Authorization: Bearer YOUR_TOKEN"
{ "success": true, "message": "Roles obtenidos exitosamente", "data": { "roles": [ { "role_id": 1, "role_name": "admin", "description": "Administrator role with full access", "status": "active", "created_at": "2024-01-01T00:00:00.000Z", "updated_at": "2024-01-01T00:00:00.000Z" }, { "role_id": 2, "role_name": "user", "description": "Standard user role", "status": "active", "created_at": "2024-01-01T00:00:00.000Z", "updated_at": "2024-01-01T00:00:00.000Z" } ], "pagination": { "currentPage": 1, "totalPages": 1, "totalItems": 3, "itemsPerPage": 10 } } }
Authorization: Bearer <token>
Show properties
Show role object
src/routes/role.routes.js:93
src/controllers/roleController.js:22