Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/iFamishedX/HungerBridge/llms.txt

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

The /v2/ping endpoint is the simplest way to verify that HungerBridge is reachable and responding. It returns the server’s current Unix timestamp in milliseconds, which lets clients calculate round-trip latency by comparing it against their own clock before and after the request.

Request

Method: GET
Path: /v2/ping

Headers

HeaderRequiredDescription
X-Auth-KeyYesAuthentication key from config.yamlauth.key

Configuration

This endpoint can be disabled in config.yaml under v2-endpoints.ping. It is enabled by default.
v2-endpoints:
  ping: true
If v2-endpoints.ping is set to false, the server returns a 403 Forbidden response instead of processing the request.

Response

ok
boolean
required
Always true on success.
server_time
integer
required
The server’s current time as milliseconds since the Unix epoch (System.currentTimeMillis()). Clients can compare this against their local clock to estimate clock skew, or measure round-trip latency by recording timestamps before sending the request and after receiving the response.

Example Response

{
  "ok": true,
  "server_time": 1718000000000
}

Error Responses

Statuserror fieldCause
401unauthorizedMissing or incorrect X-Auth-Key header
403forbiddenEndpoint disabled via v2-endpoints.ping: false
405method_not_allowedRequest method was not GET
{
  "ok": false,
  "error": "unauthorized",
  "message": "Invalid X-Auth-Key"
}

curl Example

curl -s -X GET http://localhost:30007/v2/ping \
  -H "X-Auth-Key: your-auth-key"
To measure round-trip latency, record the time before the request and subtract from the time after the response. The server_time field reflects the instant the handler ran on the server side, not the time the response was sent over the wire.

Build docs developers (and LLMs) love