Skip to main content

Health Status

GET /v1/health/status

A simple health check endpoint that returns the current system status. Use this for monitoring dashboards, alerting systems, or pre-flight checks before making other API calls.

When to Use This​

  • Uptime monitoring β€” Set up automated checks with Pingdom, UptimeRobot, etc.
  • Circuit breakers β€” Check before making requests to avoid cascading failures
  • Status pages β€” Display real-time API status to your users
  • Debugging β€” Verify connectivity before troubleshooting other issues

Request​

Headers​

No headers requiredβ€”this is a public endpoint.

Example Request​

curl -X GET https://api.verriflo.com/v1/health/status

Response​

Healthy (200)​

{
"success": true,
"message": "System is healthy",
"data": {
"status": "healthy",
"healthy": true,
"timestamp": "2024-01-15T09:00:00.000Z",
"version": "1.0.0"
}
}

Degraded (200)​

Some services are experiencing issues, but the API is still functional:

{
"success": true,
"message": "System is degraded",
"data": {
"status": "degraded",
"healthy": false,
"timestamp": "2024-01-15T09:00:00.000Z",
"version": "1.0.0"
}
}

Unhealthy (503)​

The system is experiencing critical issues:

{
"success": true,
"message": "System is unhealthy",
"data": {
"status": "unhealthy",
"healthy": false,
"timestamp": "2024-01-15T09:00:00.000Z"
}
}

Response Fields​

FieldTypeDescription
statusstring"healthy", "degraded", or "unhealthy"
healthybooleanQuick boolean check for healthy status
timestampstringCurrent server time (ISO format)
versionstringAPI version (may be omitted during issues)

HTTP Status Codes​

CodeStatusMeaning
200healthyEverything is working normally
200degradedSome issues, but core functionality works
503unhealthyCritical issues, API may not work correctly

Examples​

JavaScript: Pre-flight Check​

async function checkAPI() {
try {
const response = await fetch("https://api.verriflo.com/v1/health/status");
const { data } = await response.json();

if (!data.healthy) {
console.warn("Verriflo API is experiencing issues:", data.status);
// Maybe show a banner to users or delay non-critical operations
}

return data.healthy;
} catch (error) {
console.error("Cannot reach Verriflo API");
return false;
}
}

// Use before critical operations
async function startClass(roomId) {
const apiHealthy = await checkAPI();

if (!apiHealthy) {
showWarning("Video service may be experiencing issues. Proceed anyway?");
}

// Continue with class creation...
}

Python: Monitoring Script​

import requests
import time

def monitor_health(interval_seconds: int = 60):
"""Continuously monitor API health."""

while True:
try:
response = requests.get(
'https://api.verriflo.com/v1/health/status',
timeout=5
)

data = response.json()['data']

if not data['healthy']:
send_alert(f"⚠️ Verriflo API is {data['status']}")

print(f"[{data['timestamp']}] Status: {data['status']}")

except requests.exceptions.RequestException as e:
send_alert(f"🚨 Verriflo API unreachable: {e}")

time.sleep(interval_seconds)

Shell: Simple Check​

#!/bin/bash
# health-check.sh - Exit 0 if healthy, 1 otherwise

STATUS=$(curl -s https://api.verriflo.com/v1/health/status | jq -r '.data.status')

if [ "$STATUS" = "healthy" ]; then
echo "βœ… API is healthy"
exit 0
else
echo "⚠️ API status: $STATUS"
exit 1
fi

Best Practices​

  1. Don't over-poll β€” Check every 30-60 seconds, not every second
  2. Use timeouts β€” Set a 5-10 second timeout on health checks
  3. Alert on patterns β€” Don't alert on single failures; wait for 2-3 consecutive failures
  4. Cache the result β€” If checking before each request, cache for a few seconds

Uptime Monitoring Setup​

UptimeRobot / Pingdom​

SettingValue
URLhttps://api.verriflo.com/v1/health/status
MethodGET
Expected Status200
Check Interval1-5 minutes
Keyword Check"healthy":true

Note: This endpoint is rate-limited to prevent abuse. Reasonable monitoring (< 1 request/second) is fine.