The logs API exposes ContabilidadISV’s system audit trail (bitácora del sistema). Only users withDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Medinaallan/ContabilidadISV/llms.txt
Use this file to discover all available pages before exploring further.
role='admin' can access either endpoint. Log entries are formatted for human readability before being returned: raw action codes are translated to friendly Spanish titles, dates are localised to Honduras time (UTC-6), and each entry carries a category and priority label suitable for display in the admin dashboard.
Entries with
action = 'api_request' or action = 'API_REQUEST' are
automatically filtered out of GET /api/logs responses. Only meaningful
business events (logins, consolidation changes, user management, etc.) are
returned.GET /api/logs
Retrieves a paginated list of audit log entries, optionally filtered by user or action type. Query parametersMaximum number of entries to return. Defaults to 100.
Filter to entries generated by a specific user (numeric user ID).
Filter to entries with a specific action code (e.g.
"USER_LOGIN",
"consolidacion_created").Always
true on a successful response.Array of formatted log entry objects. Each entry contains:
Aggregate statistics for the returned (filtered) log set.
Total count of log entries in the response array (mirrors
statistics.total).POST /api/logs
Allows an admin to manually insert a log entry — useful for recording out-of-band administrative actions or annotating the audit trail. Admin only. Request bodyAction code to record (e.g.
"manual_audit", "database_backup"). Will be
stored verbatim and mapped to a category/priority using the same rules as
system-generated events.Human-readable description of the event being logged.
201 Created
true on successful creation."Log creado exitosamente".The newly created log entry in fully formatted form (all fields from
GET /api/logs plus id and created_at).Log categories and priorities
The formatting layer maps raw action codes to categories and priorities using the rules shown in the tables below.Categories
| Category | Triggered by |
|---|---|
| Inicio de Sesión | USER_LOGIN, login, or api_request containing "login" |
| Cierre de Sesión | USER_LOGOUT, logout, or api_request containing "logout" |
| Contabilidad | Actions containing "consolidacion" |
| Gestión de Usuarios | Actions containing "user" or requests to /users |
| Gestión de Clientes | Actions containing "cliente" |
| Reportes | Actions containing "reporte" or requests to /report |
| Sistema | SYSTEM_INIT or actions containing "system" |
| Errores | error action code |
Priorities
| Priority | Label | Used when |
|---|---|---|
normal | Standard event | Logouts, user lookups, client lookups, reports |
importante | Notable event | Logins, consolidation changes, system init |
critico | Critical event | Error events (action = "error") |
Related pages
- Features → Audit Logs — UI walkthrough of the bitácora module
- Admin API — security stats and database management (also admin-only)
- Auth API — login and logout endpoints that generate log entries
- Users API — user management operations tracked in the audit log