Skip to main content
GET
/
api
/
Usuario
/
Lista
List Users
curl --request GET \
  --url https://api.example.com/api/Usuario/Lista
{
  "status": true,
  "value": [
    {
      "idUsuario": 123,
      "nombreCompleto": "<string>",
      "correo": "<string>",
      "idRol": 123,
      "rolDescripcion": "<string>",
      "clave": "<string>",
      "esActivo": 123
    }
  ],
  "msg": "<string>"
}

Endpoint

GET /api/Usuario/Lista
Retrieves all users registered in the Sistema Venta application, including their role information and status.

Response

The endpoint returns a Response<List<UsuarioDTO>> wrapper containing the list of users.
status
boolean
required
Indicates if the request was successful
value
UsuarioDTO[]
Array of user objects
msg
string
Error message if status is false

Example Request

curl -X GET "https://api.example.com/api/Usuario/Lista" \
  -H "Content-Type: application/json"

Example Response

{
  "status": true,
  "value": [
    {
      "idUsuario": 1,
      "nombreCompleto": "Juan Pérez",
      "correo": "[email protected]",
      "idRol": 1,
      "rolDescripcion": "Administrador",
      "clave": "hashed_password",
      "esActivo": 1
    },
    {
      "idUsuario": 2,
      "nombreCompleto": "María González",
      "correo": "[email protected]",
      "idRol": 2,
      "rolDescripcion": "Empleado",
      "clave": "hashed_password",
      "esActivo": 1
    }
  ],
  "msg": null
}

Implementation Details

  • Controller: UsuarioController.cs:23
  • Service Method: IUsuarioService.Lista()
  • Response Type: Response<List<UsuarioDTO>>
  • HTTP Status: Always returns 200 OK (check status field for actual result)

Build docs developers (and LLMs) love