Skip to main content
GET
/
api
/
Usuario
/
Lista
Session Management
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>",
  "status: false": {}
}

Overview

This endpoint retrieves a list of all users in the system. It’s typically used for user management and session verification purposes.

Request

Endpoint

GET /api/Usuario/Lista

Headers

Content-Type
string
application/json

Response

Success Response (200 OK)

Returns a response wrapper containing a list of users.
status
boolean
required
Indicates if the operation was successful
value
array
Array of user objects
msg
string
Error message (populated when status is false)

Examples

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

Success Response Example

{
  "status": true,
  "value": [
    {
      "IdUsuario": 1,
      "NombreCompleto": "Juan Pérez",
      "Correo": "[email protected]",
      "IdRol": 1,
      "RolDescripcion": "Administrador",
      "Clave": null,
      "EsActivo": 1
    },
    {
      "IdUsuario": 2,
      "NombreCompleto": "María González",
      "Correo": "[email protected]",
      "IdRol": 2,
      "RolDescripcion": "Empleado",
      "Clave": null,
      "EsActivo": 1
    }
  ],
  "msg": null
}

Error Response Example

{
  "status": false,
  "value": null,
  "msg": "Error al obtener la lista de usuarios"
}

Error Codes

status: false
error
Request failureCommon error messages:
  • “Error al obtener la lista de usuarios” - Database or service error
  • “Acceso denegado” - Insufficient permissions
  • “Servicio no disponible” - Service temporarily unavailable

Create User

POST /api/Usuario/Guardar
Creates a new user in the system. Request Body:
{
  "NombreCompleto": "Carlos Ruiz",
  "Correo": "[email protected]",
  "IdRol": 2,
  "Clave": "securePassword123",
  "EsActivo": 1
}

Update User

PUT /api/Usuario/Editar
Updates an existing user’s information. Request Body:
{
  "IdUsuario": 3,
  "NombreCompleto": "Carlos Ruiz Actualizado",
  "Correo": "[email protected]",
  "IdRol": 1,
  "Clave": "newPassword456",
  "EsActivo": 1
}

Delete User

DELETE /api/Usuario/Eliminar/{id}
Deletes a user from the system. Example:
curl -X DELETE https://api.example.com/api/Usuario/Eliminar/3

Notes

  • The endpoint always returns HTTP 200 OK status code. Check the status field in the response body to determine success or failure.
  • The Clave (password) field may be null or masked in responses for security purposes.
  • EsActivo field uses integer values: 1 for active users, 0 for inactive/disabled users.
  • This endpoint requires appropriate authentication and authorization (implementation dependent).
  • Use this endpoint to validate active sessions by checking if the user’s EsActivo status is 1.

Build docs developers (and LLMs) love