Skip to content

Health


Routers for checking application status

check_status() async

Endpoint for checking service health.

Returns:

Name Type Description
response int

200 ok if service is available

Source code in src/app/routers/health/health.py
@router.get("/check_status")
async def check_status():
    """
    Endpoint for checking service health.

    Returns
    -------
    response : int
        200 ok if service is available
    """
    return status.HTTP_200_OK

health_check() async

Endpoint for checking dependencies

Returns:

Name Type Description
response HealthCheckResponse

Status of the API and each of its dependencies

Source code in src/app/routers/health/health.py
@router.get("/health_check", response_model=schemas.HealthCheckResponse,
            response_model_exclude_none=True)
async def health_check():
    """
    Endpoint for  checking dependencies

    Returns
    -------
    response : schemas.HealthCheckResponse
        Status of the API and each of its dependencies
    """
    # check API all dependencies
    healthy, dependencies = await services.health_check()
    return schemas.HealthCheckResponse(healthy=healthy, dependencies=dependencies)