Retrieves a list of all users in the system.
Endpoint
Authentication
This endpoint requires JWT authentication and Admin role.
Authorization: Bearer YOUR_JWT_TOKEN
Response
Returns an array of user objects.
Unique identifier for the user
User role (Admin, Psicologo, TrabajoSocial, Guia)
Timestamp when user was created
Example Request
curl -X GET http://localhost:3000/users \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
Example Response
[
{
"id": 1,
"nombre": "Administrator",
"rol": "Admin",
"nomUsuario": "admin",
"estatus": true,
"creadoEn": "2026-03-01T08:00:00.000Z"
},
{
"id": 2,
"nombre": "María García",
"rol": "Psicologo",
"nomUsuario": "mgarcia",
"estatus": true,
"creadoEn": "2026-03-02T09:15:00.000Z"
},
{
"id": 3,
"nombre": "Carlos López",
"rol": "TrabajoSocial",
"nomUsuario": "clopez",
"estatus": true,
"creadoEn": "2026-03-03T10:30:00.000Z"
}
]
Only users with Admin role can access this endpoint.