Skip to main content
GET
/
v1
/
trips
/
health
curl "https://api.bookovia.com/v1/trips/health" \
  -H "X-API-Key: bkv_live_0ef660a982f34f1fcb6a68d29c2d911379d3abf6b36282d9de77dd94c3391e74"
{
  "service": "bookovia-trip-service",
  "status": "healthy",
  "timestamp": "2026-04-14T21:25:45Z",
  "version": "2.0.0",
  "uptime_seconds": 234567,
  "database": {
    "status": "connected",
    "response_time_ms": 12,
    "active_connections": 8
  },
  "active_trips": {
    "total_count": 1247,
    "organization_count": 89,
    "avg_duration_minutes": 127
  },
  "performance": {
    "requests_per_minute": 445,
    "avg_response_time_ms": 89,
    "error_rate_percent": 0.2
  },
  "dependencies": {
    "supabase": "healthy",
    "redis_cache": "healthy", 
    "location_service": "healthy"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.bookovia.com/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Provides real-time health status for the trip management service, including database connectivity, active trip counts, and system performance metrics. Essential for monitoring and ensuring reliable trip tracking operations.

Headers

X-API-Key
string
required
Your API key for authentication. Use your production key starting with bkv_live_

Response

service
string
Service identifier, always “bookovia-trip-service”
status
string
Overall service status: “healthy”, “degraded”, or “unhealthy”
timestamp
string
ISO 8601 timestamp of the health check
version
string
Current service version
uptime_seconds
number
Service uptime in seconds
database
object
Database connection status
active_trips
object
Current active trip statistics
performance
object
Service performance metrics
dependencies
object
External service dependencies status
curl "https://api.bookovia.com/v1/trips/health" \
  -H "X-API-Key: bkv_live_0ef660a982f34f1fcb6a68d29c2d911379d3abf6b36282d9de77dd94c3391e74"
{
  "service": "bookovia-trip-service",
  "status": "healthy",
  "timestamp": "2026-04-14T21:25:45Z",
  "version": "2.0.0",
  "uptime_seconds": 234567,
  "database": {
    "status": "connected",
    "response_time_ms": 12,
    "active_connections": 8
  },
  "active_trips": {
    "total_count": 1247,
    "organization_count": 89,
    "avg_duration_minutes": 127
  },
  "performance": {
    "requests_per_minute": 445,
    "avg_response_time_ms": 89,
    "error_rate_percent": 0.2
  },
  "dependencies": {
    "supabase": "healthy",
    "redis_cache": "healthy", 
    "location_service": "healthy"
  }
}

Status Levels

Healthy ✅

  • All systems operational
  • Database response time < 100ms
  • Error rate < 1%
  • All dependencies available

Degraded ⚠️

  • Service functional but performance issues
  • Database response time 100-500ms
  • Error rate 1-5%
  • Some dependencies slow but available

Unhealthy ❌

  • Service experiencing significant issues
  • Database response time > 500ms or disconnected
  • Error rate > 5%
  • Critical dependencies unavailable

Monitoring Integration

This endpoint is designed for integration with monitoring and alerting systems:

Prometheus Metrics

# Example Prometheus config
- job_name: 'bookovia-trips'
  static_configs:
    - targets: ['api.bookovia.com:443']
  metrics_path: '/v1/trips/health'
  scrape_interval: 30s
  scheme: https

Uptime Monitoring

  • Set up alerts when status is not “healthy”
  • Monitor response time trends
  • Track active trip count anomalies

Load Balancer Health Checks

  • Use this endpoint for load balancer health checks
  • Configure appropriate timeout values (recommended: 5 seconds)
  • Set up automatic failover based on health status

Performance Thresholds

MetricHealthyDegradedUnhealthy
Database Response Time< 100ms100-500ms> 500ms
API Response Time< 200ms200-1000ms> 1000ms
Error Rate< 1%1-5%> 5%
Active Connections< 2020-50> 50

Use Cases

  • Production Monitoring: Continuous health monitoring for production deployments
  • Load Balancer: Health check endpoint for traffic routing decisions
  • Alerting: Trigger alerts when service degrades or fails
  • Capacity Planning: Monitor active trip counts and resource usage
  • Troubleshooting: Diagnose performance issues and dependency problems

Important Notes

  • Health check responses are cached for 10 seconds to prevent overload
  • Authentication required to prevent abuse and protect sensitive metrics
  • Response times exclude network latency, only measure server processing
  • Active trip counts are approximate and updated every 30 seconds