From fae302ec37a6162623505874837c00a377df1e4a Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 24 Nov 2025 12:48:38 -0500 Subject: [PATCH] Add /api/health endpoint to API documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added /api/health endpoint for monitoring and status verification. Returns service status, name, and version information. Now visible in Swagger docs at /api/docs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- kjvstudy_org/server.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/kjvstudy_org/server.py b/kjvstudy_org/server.py index 1d30e80..36e404c 100644 --- a/kjvstudy_org/server.py +++ b/kjvstudy_org/server.py @@ -854,6 +854,7 @@ def api_index(): "openapi_json": "/api/openapi.json" }, "endpoints": { + "health": "/api/health", "search": "/api/search?q={query}", "verse_of_the_day": "/api/verse-of-the-day", "verse": "/api/verse/{book}/{chapter}/{verse}", @@ -872,6 +873,15 @@ def api_index(): } } +@app.get("/api/health") +def api_health_check(): + """API health check endpoint for monitoring and status verification""" + return { + "status": "healthy", + "service": "KJV Study API", + "version": "1.0.0" + } + @app.get("/api/search") def search_api(q: str = Query(..., description="Search query", example="faith"), limit: Optional[int] = Query(None, description="Max results", example=10)): """JSON API endpoint for search"""