Health Check Endpoint

Monitor your Docura AI server status and discover available endpoints using the /health endpoint. Perfect for monitoring, debugging, and API discovery.

Example Health Check Endpoint
A demo of the Health Check Endpoint component in action.

Check if your Docura server is running and healthy.

GET /health
Returns:
• Server status message
• API version
• Available endpoints

How to add

# Using the deployed Docura API
BASE_URL = "https://yourapi.example.com"

# Or run locally for development
git clone https://github.com/msnabiel/Docura.git
cd docura
pip install -r requirements.txt
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
# BASE_URL = "http://localhost:8000"

How to use

# Using cURL
curl -X GET "https://yourapi.example.com/health" \
  -H "Accept: application/json"

# For local development
curl -X GET "http://localhost:8000/health" \
  -H "Accept: application/json"

# Expected Response:
# HTTP/1.1 200 OK
# Content-Type: application/json
# 
# {
#   "message": "Document Query API",
#   "version": "1.0.0",
#   "endpoints": {
#     "health": "/health",
#     "upload": "/upload",
#     "query": "/query",
#     "query_json": "/query_json"
#   }
# }

# Using PowerShell (Windows)
Invoke-RestMethod -Uri "https://yourapi.example.com/health" -Method GET

# Using wget
wget -qO- "https://yourapi.example.com/health"

📡 Endpoint Details

Method:GET
Path:/health
Authentication:None required
Rate Limit:Unlimited

📮 Postman Setup

1. Create New Request

• Method: GET
• URL: https://yourapi.example.com/health

2. Headers (Optional)

Accept: application/json

3. Send Request

Click Send — no authentication required!

✅ Use Cases

  • Health Monitoring: Check if your Docura server is running
  • API Discovery: Get a list of all available endpoints
  • Version Checking: Verify which version of Docura is running
  • Load Balancer Health Checks: Perfect for deployment health checks

📋 Response Structure

// Example Response
{
  "message": "Document Query API",
  "version": "1.0.0",
  "endpoints": {
    "health": "/health",
    "upload": "/upload",
    "query": "/query",
    "query_json": "/query_json"
  }
}

🔧 Testing Tools

  • Postman: Perfect for interactive testing and collection management
  • cURL: Command-line testing and scripting
  • Browser: Simply visit the URL for quick checks
  • Monitoring Tools: Use for uptime monitoring (Pingdom, UptimeRobot)
Tip: Use this endpoint for monitoring dashboards, health checks in CI/CD pipelines, and to verify server connectivity before making other API calls. No authentication required!