Skip to main content

Overview

The health endpoint provides a simple way to verify that the Beacon API server is running and responsive. It returns basic service information including the server status, version, and service name.

Endpoint

GET /health

Authentication

No authentication required.

Request

This endpoint accepts no parameters or request body.

Example Request

curl -X GET http://localhost:8080/health

Response

Success Response (200 OK)

Returns a JSON object with health status information.
status
string
required
Current status of the service. Always returns "ok" when the server is healthy.
version
string
required
The current version of the Beacon API (e.g., "0.2.2").
name
string
required
The service name. Always returns "beacon".

Example Response

{
  "status": "ok",
  "version": "0.2.2",
  "name": "beacon"
}

Use Cases

  • Monitoring: Use this endpoint in health check scripts or monitoring systems to verify API availability
  • Load Balancers: Configure load balancers to ping this endpoint to determine if the service is healthy
  • Version Checking: Retrieve the current API version for compatibility checks
  • Uptime Monitoring: Include in automated uptime monitoring workflows

Error Handling

If the server is down or unreachable, the request will fail with a connection error. No specific error responses are returned by this endpoint when the server is operational.

Build docs developers (and LLMs) love