Health check
const url = 'https://api.surveycoder.io/health';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.surveycoder.io/healthUnauthenticated probe that checks Supabase, Redis, and SPSS microservice connectivity. Returns 200 when all dependencies are healthy, 503 when any dependency is degraded.
Responses
Section titled “ Responses ”All dependencies healthy
Health check response with dependency statuses.
object
object
Overall system status.
Server time when the check ran.
Application version from package.json.
Short Git commit SHA of the running build.
Seconds since the server process started.
Runtime environment.
Status of each external dependency.
object
object
ok— dependency reachable and responding.error— dependency unreachable or returning errors.unavailable— dependency not configured (non-critical).
Round-trip time in milliseconds (omitted if unavailable).
Example
{ "success": true, "data": { "status": "healthy", "version": "1.0.0", "commit": "a1b2c3d", "uptime_seconds": 86400, "environment": "production", "dependencies": { "supabase": { "status": "ok", "latency_ms": 45 }, "redis": { "status": "ok", "latency_ms": 2 }, "spss_service": { "status": "unavailable" } } }}One or more dependencies degraded
Health check response with dependency statuses.
object
object
Overall system status.
Server time when the check ran.
Application version from package.json.
Short Git commit SHA of the running build.
Seconds since the server process started.
Runtime environment.
Status of each external dependency.
object
object
ok— dependency reachable and responding.error— dependency unreachable or returning errors.unavailable— dependency not configured (non-critical).
Round-trip time in milliseconds (omitted if unavailable).
Example
{ "success": true, "data": { "status": "healthy", "version": "1.0.0", "commit": "a1b2c3d", "uptime_seconds": 86400, "environment": "production", "dependencies": { "supabase": { "status": "ok", "latency_ms": 45 }, "redis": { "status": "ok", "latency_ms": 2 }, "spss_service": { "status": "unavailable" } } }}