A multipurpose python flask API server and administration SPA
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
532 B

  1. """Endpoint to expose the health of the application."""
  2. from flask import Blueprint
  3. from corvus.api.decorators import return_json
  4. from corvus.api.model import APIResponse, APIMessage
  5. HEALTH_BLUEPRINT = Blueprint(
  6. name='health', import_name=__name__, url_prefix='/health')
  7. @HEALTH_BLUEPRINT.route('', methods=['GET'])
  8. @return_json
  9. def get_health() -> APIResponse:
  10. """
  11. Retrieve the health for the service.
  12. :return:
  13. """
  14. return APIResponse(
  15. APIMessage(True, 'Service is healthy'),
  16. 200
  17. )