28 lines
613 B
Python
28 lines
613 B
Python
"""
|
|
Controller for health check endpoint.
|
|
"""
|
|
from flask import Blueprint, jsonify
|
|
from flask.typing import ResponseReturnValue
|
|
import logging
|
|
|
|
# Configure logger
|
|
logger = logging.getLogger(__name__)
|
|
|
|
# Create blueprint
|
|
health_bp = Blueprint('health', __name__)
|
|
|
|
|
|
@health_bp.route('/health', methods=['GET'])
|
|
def health_check() -> ResponseReturnValue:
|
|
"""
|
|
Endpoint to check API health.
|
|
|
|
This endpoint is used by Docker healthcheck and monitoring systems.
|
|
|
|
Returns:
|
|
JSON response with health status
|
|
"""
|
|
return jsonify({
|
|
"status": "healthy",
|
|
"version": "1.0.0"
|
|
}) |