Skip to main content
GET
/
v1
/
location
/
health
Location service health check
curl --request GET \
  --url https://api.vepler.com/v1/v1/location/health \
  --header 'x-api-key: <api-key>'
{
  "status": "<string>",
  "service": "<string>",
  "timestamp": "<string>",
  "version": "<string>"
}

Overview

This endpoint provides health status information for the location service, including availability, performance metrics, and data freshness.

Response

{
  "status": "healthy",
  "version": "1.0.0",
  "timestamp": "2024-03-20T14:30:00Z",
  "checks": {
    "database": {
      "status": "healthy",
      "responseTime": 12
    },
    "cache": {
      "status": "healthy",
      "hitRate": 0.94
    },
    "dataFreshness": {
      "status": "healthy",
      "lastUpdate": "2024-03-20T02:00:00Z",
      "nextUpdate": "2024-03-21T02:00:00Z"
    }
  },
  "metrics": {
    "totalStreets": 1247893,
    "averageResponseTime": 145,
    "uptime": 99.97
  }
}

Status Values

StatusDescription
healthyService is operating normally
degradedService is operational but experiencing issues
unhealthyService is not operational

Response Fields

FieldTypeDescription
statusstringOverall service health status
versionstringAPI version
timestampstringCurrent server time (ISO 8601)
checks.database.statusstringDatabase health status
checks.database.responseTimenumberDatabase response time in ms
checks.cache.statusstringCache health status
checks.cache.hitRatenumberCache hit rate (0-1)
checks.dataFreshness.statusstringData freshness status
checks.dataFreshness.lastUpdatestringLast data update timestamp
checks.dataFreshness.nextUpdatestringNext scheduled update
metrics.totalStreetsnumberTotal streets in database
metrics.averageResponseTimenumberAverage response time in ms
metrics.uptimenumberService uptime percentage

Example Request

curl -H "x-api-key: YOUR_API_KEY" \
  https://api.vepler.com/v1/location/health
import { Vepler } from '@vepler/sdk';

const vepler = new Vepler({ apiKey: process.env.VEPLER_API_KEY });

const health = await vepler.location.health();

if (health.status === 'healthy') {
  console.log('Location service is operational');
} else {
  console.warn(`Location service status: ${health.status}`);
}

Use Cases

  • Monitor service availability before making requests
  • Implement circuit breakers in your application
  • Display service status in admin dashboards
  • Automated health monitoring and alerting

Authorizations

x-api-key
string
header
required

API Key authentication for Vepler API. Get your API key from the Vepler dashboard.

Response

200 - application/json

Service is healthy

status
string
required
service
string
required
timestamp
string
version
string