Skip to main content
GET
/
secured
/
getUsers
Get Users
curl --request GET \
  --url https://api.example.com/secured/getUsers
{
  "status": 123,
  "usuarios": [
    {
      "id": 123,
      "tipoUsuario": "<string>",
      "correo": "<string>",
      "nombre": "<string>",
      "apellido": "<string>",
      "password": "<string>"
    }
  ],
  "401 Unauthorized": {}
}

Authentication

This endpoint requires authentication. Include a valid JWT token in the Authorization header.

Response

status
number
HTTP status code (200 for success)
usuarios
array
Array of user objects
curl --location 'http://localhost:8080/secured/getUsers' \
--header 'Authorization: YOUR_JWT_TOKEN'

Response Example

{
  "status": 200,
  "usuarios": [
    {
      "id": 1,
      "tipoUsuario": "admin",
      "correo": "[email protected]",
      "nombre": "Juan",
      "apellido": "Pérez",
      "password": "$2b$10$..."
    },
    {
      "id": 2,
      "tipoUsuario": "user",
      "correo": "[email protected]",
      "nombre": "María",
      "apellido": "González",
      "password": "$2b$10$..."
    }
  ]
}

Error Responses

401 Unauthorized
object
Returned when the JWT token is invalid or missing
{
  "msg": "Token_invalido"
}
or
{
  "msg": "Sin autorización"
}

Build docs developers (and LLMs) love