GET /health

GET/healthsin auth

Healthcheck para readiness/liveness probes (k8s, Docker healthcheck). No requiere autenticación. La detección de LibreOffice se cachea 60s para no hacer fork-bomb si la sondas son agresivas.

Request

curl -i http://localhost:3000/health

Response — todo OK

HTTP/1.1 200 OK
content-type: application/json
x-request-id: 5d8c1e4f-...

{
  "status": "ok",
  "uptimeMs": 12345,
  "libreoffice": { "available": true, "version": "LibreOffice 7.4.7" },
  "tmpDir": { "writable": true }
}

Response — degradado

status: "degraded" (sigue 200) si LibreOffice no está disponible o TMP_DIR no es escribible. El render .docx sigue operativo; el render format=pdf devolverá 503 LIBREOFFICE_UNAVAILABLE.

HTTP/1.1 200 OK

{
  "status": "degraded",
  "uptimeMs": 543,
  "libreoffice": { "available": false },
  "tmpDir": { "writable": true }
}

Response — caído

503 únicamente si TEMPLATES_DIR no es legible (sin él el servicio no puede operar).

HTTP/1.1 503 Service Unavailable

{
  "status": "down",
  "uptimeMs": 88,
  "libreoffice": { "available": false },
  "templatesDir": { "readable": false }
}

Estados posibles

statusHTTPCuándo
ok200Todo normal.
degraded200Falta LibreOffice o TMP_DIR no escribible. Servicio aún sirve docx.
down503TEMPLATES_DIR no legible. El servicio no puede operar.