INNER CODE UNIT · Python
_get_timestamp
SHAdd0WTAka/Zen-Ai-Pentest · api/main.py:829
def _get_timestamp() -> str:
"""Gib aktuellen ISO-Timestamp zurück."""
return datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
@app.get("/health", tags=["Health"], summary="Einfacher Health Check (Root)")
async def root_health_check():
"""
Einfacher Health Check für Load Balancer und Docker.
**Alternative:** `GET /api/v1/health` (empfohlen)
"""
return {
"status": "healthy",
"timestamp": _get_timestamp(),
"version": _API_VERSION,
}