GET

Health Check API

Monitor the API status and verify that the service is running properly.

Overview

Service Monitoring

Use these endpoints to monitor the API health and ensure the service is operational.

The Health Check endpoints provide a simple way to verify that the StayAPI service is running and responding to requests. These endpoints are useful for monitoring, load balancers, and uptime checks.

Root Endpoint

GET https://api.stayapi.com/

Returns basic API information and available endpoints.

Health Endpoint

GET https://api.stayapi.com/health

Returns detailed health status and version information.

V1 Health Endpoint

GET https://api.stayapi.com/v1/health

Returns V1-specific health status.

Parameters

No parameters required for health check endpoints.

Response Format

Field Type Description
status string Current status of the API (e.g., "healthy")
message string Descriptive message about the API status
version string API version information

Usage Tips

Monitoring Best Practices

  • Use the /health endpoint for detailed monitoring
  • The root / endpoint is ideal for simple uptime checks
  • Check for HTTP 200 status code to verify the service is running
  • Parse the response body for additional status information

Load Balancer Configuration

Configure your load balancer to use the /health endpoint for health checks with a reasonable interval (e.g., every 30 seconds).

Request
curl -X GET "https://api.stayapi.com/health"
Response
{
  "status": "healthy",
  "message": "StayAPI is running",
  "version": "1.0.0",
  "timestamp": "2024-01-15T10:30:00Z"
}