Files
kontor/kontor-api/src/apis/version1/healthcheck.py
T
tpeetz 6077f685e0
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 4s
Remove obsolete endpoints (#89)
Remove endpoints api/login/token and api/login/profile

---------

Co-authored-by: Thomas Peetz <thomas.peetz@cimt-ag.de>
Reviewed-on: #89
2026-05-19 17:52:30 +00:00

26 lines
838 B
Python

from fastapi import APIRouter, status
from src.schema.admin.healthcheck import HealthCheck
health_router = APIRouter()
@health_router.get(
"/health",
tags=["healthcheck"],
summary="Perform a health check",
response_description="Return HTTP status code 200 (OK)",
status_code=status.HTTP_200_OK
)
def health_check() -> HealthCheck:
"""
## Perform a health check
Endpoint to perform a healthcheck on. This endpoint can primarily be used Docker
to ensure a robust container orchestration and management is in place. Other
services which rely on proper functioning of the API service will not deploy if this
endpoint returns any other HTTP status code except 200 (OK).
:return:
HealthCheck: Returns a JSON response with the health status
"""
return HealthCheck(status="ok")