API Reference
Health
GET
/healthCheck the API health status. No authentication required.
Overview
The Health endpoint provides a simple way to check if the Lemma API is operational. This endpoint does not require authentication and can be used for monitoring and uptime checks.
Use this endpoint to verify API availability before making authenticated requests or to set up automated health monitoring.
Parameters
Response Structure
The health endpoint returns a simple response with a msg field indicating the API status. Note: This endpoint does not follow the standard response wrapper format used by other endpoints.
msgstringStatus message. For health endpoint, this will be "running fine" when the API is operational.
Error Responses
Error responses follow the same structure with status: 0 and include an errorCode field:
Example Error Response
{
"status": 0,
"errorCode": "",
"msg": "internal server error"
}Use Cases
Example: Automated Health Check
Python - Monitoring Script
import requests
import time
def check_health():
try:
response = requests.get(
"https://api.lemma.la/health",
timeout=5
)
if response.status_code == 200:
data = response.json()
if data.get('msg') == 'running fine':
print("✓ API is healthy")
return True
else:
print(f"⚠️ API status: {data}")
return False
else:
print(f"✗ API returned {response.status_code}")
return False
except requests.exceptions.Timeout:
print("✗ Health check timed out")
return False
except Exception as e:
print(f"✗ Health check failed: {e}")
return False
# Run health check every 60 seconds
while True:
check_health()
time.sleep(60)