The health endpoint provides a real-time snapshot of Monitor API’s operational status. It requires no authentication and is suitable for polling from external monitoring tools, load balancers, or dashboard widgets. A single request triggers live checks against PostgreSQL, the local filesystem, the evidence storage directory, and Node.js process memory — all results are returned in one JSON object.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/sheeplettuce/Monitor/llms.txt
Use this file to discover all available pages before exploring further.
GET /api/health
No authentication required.Response — 200 OK
This endpoint always returns HTTP200. Inspect the individual boolean fields (backend, database) to determine actual service health — a 200 status code alone does not guarantee the database is reachable.
Client IP address as seen by the server, derived from
req.ip || req.socket.remoteAddress || "desconocida". Useful for verifying network routing behind a proxy or reverse proxy.Always
true when this endpoint returns a response. Its presence in the payload confirms the Express process is alive and handling requests.true if a SELECT 1 query against PostgreSQL succeeded; false if the query threw an error. A false value means the API cannot read or write claim data.Disk usage statistics for the volume where the API process is running. On Linux, sourced from
df -BGB; values are integer strings (e.g. "45"). On Windows, sourced from wmic logicaldisk; values are formatted to one decimal place (e.g. "45.2").Statistics about the evidence file directory (
EVIDENCIAS_DIR). This directory stores uploaded insurance claim files. Falls back to { archivos: 0, tamaño_MB: "0" } if the directory does not exist or cannot be read.Total number of
expediente (claim) records in the PostgreSQL database, obtained via prisma.expediente.count(). Returns 0 if the query fails.Memory usage for the Node.js process and the host machine.
GET /discovery
No authentication required. Returns all non-loopback IPv4 addresses bound to the server’s network interfaces. Clients on the same LAN can call this endpoint to locate the Monitor API server without manual IP configuration.Response — 200 OK
Always
"Monitor API". Acts as a service identifier so clients can confirm they have reached the correct host.Array of IPv4 address strings. Loopback addresses (
127.x.x.x) are excluded. A machine with both a wired and a wireless adapter will surface both addresses here.Monitor API also runs automatic health checks on startup and then on a repeating
setInterval every 5 minutes. These checks (backend port probe, PostgreSQL SELECT 1, disk stats, evidencias directory scan, and a frontend availability probe on port 8081) are logged to both stdout and logs/app.log in the project root. Check that log file for historical status data or to diagnose intermittent failures outside of a polling window.