Added an unauthenticated API endpoint to test Bazarr availability: /api/system/ping

This commit is contained in:
morpheus65535 2025-04-09 07:12:17 -04:00
parent 84ebcf7a37
commit 2c7294de0d
2 changed files with 15 additions and 0 deletions

View file

@ -9,6 +9,7 @@ from .tasks import api_ns_system_tasks
from .logs import api_ns_system_logs
from .status import api_ns_system_status
from .health import api_ns_system_health
from .ping import api_ns_system_ping
from .releases import api_ns_system_releases
from .settings import api_ns_system_settings
from .languages import api_ns_system_languages
@ -25,6 +26,7 @@ api_ns_list_system = [
api_ns_system_languages_profiles,
api_ns_system_logs,
api_ns_system_notifications,
api_ns_system_ping,
api_ns_system_releases,
api_ns_system_searches,
api_ns_system_settings,

13
bazarr/api/system/ping.py Normal file
View file

@ -0,0 +1,13 @@
# coding=utf-8
from flask_restx import Resource, Namespace
api_ns_system_ping = Namespace('System Ping', description='Unauthenticated endpoint to check Bazarr availability')
@api_ns_system_ping.route('system/ping')
class SystemPing(Resource):
@api_ns_system_ping.response(200, "Success")
def get(self):
"""Return status and http 200"""
return {'status': 'OK'}, 200