Instance
/health and /logs report on the state of an instance of the API rather than offering a utility. They sit at the root, outside any version.
Both routes are called without a version: https://api.moxon.dev/health, not /v6/health. They count towards the rate limits like any other request. GET / lists them with the other root routes, /logs only once it is configured.
GET /health answers with the state of the instance: its version, how long it has been running and how much memory it uses. It needs no token, which makes it the route to point a monitoring probe at. The Try below sends it to api.moxon.dev when the page opens, so its answer is the live one.
curl -X GET \ "https://api.moxon.dev/health"statusstringAlways
ok: an instance that answers is upuptimenumberSeconds since the instance started
versionstringRelease of the API the instance runs
nodestringVersion of Node.js
memory.rssstringMemory held by the process, in MB with one decimal
memory.heap_usedstringPart of the JavaScript heap in use, in MB
memory.heap_totalstringSize of the JavaScript heap, in MB
connectionsnumberClient addresses the rate limiter tracks in the current hour
logsnumberEntries held in the request log, up to 1,000
GET /logs returns the last 1,000 requests the instance answered, oldest first. It carries the traffic of every caller, so it is closed by default: it opens only once LOGS_TOKEN is set, and then asks for that value in the X-Logs-Token header.
curl -H "X-Logs-Token: YOUR_LOGS_TOKEN" https://api.moxon.dev/logs[
{
"timestamp": 1792779323895,
"level": "info",
"method": "POST",
"url": "/v6/hash",
"status": 200,
"duration": "0ms",
"platform": "Android"
},
{
"timestamp": 1792781601223,
"level": "info",
"method": "GET",
"url": "/health",
"status": 200,
"duration": "5ms"
},
{
"timestamp": 1792781714358,
"level": "warn",
"method": "GET",
"url": "/statistics?values",
"status": 404,
"duration": "0ms"
}
]timestampnumberWhen the request was logged, in milliseconds since 1970
levelstringinfobelow 400,warnfrom 400 to 499,errorfrom 500methodstringHTTP method of the request
urlstringPath of the request, with the names of its query parameters but not their values
statusnumberHTTP status of the answer, a
304recorded as200durationstringTime taken to answer, such as
12msplatformstringOperating system of the client, present only when the browser sends
Sec-CH-UA-Platform
- The values of the query parameters:
?text=secretis recorded as?text. - The private tokens of the chat and tic-tac-toe paths, replaced by
[redacted]. - The bodies of the requests and of the answers.
- The
HEADrequests, and the calls to/logsitself.
The log lives in the memory of the process: it starts empty when the instance restarts.
- 404
Endpoint '/logs' does not exist.LOGS_TOKENis not set on the instance: the route answers like an unknown path - 401
Invalid token.TheX-Logs-Tokenheader is missing or differs fromLOGS_TOKEN
An instance you run yourself reads its settings from environment variables. One of them concerns this page:
| Variable | Default | Effect |
|---|---|---|
LOGS_TOKEN | none | Value expected in the X-Logs-Token header; while it is unset, /logs answers 404 |
Keep the token secret
Whoever holds LOGS_TOKEN reads which endpoints every client calls, how often and from which system. Use a long random value, and send it only over HTTPS.
Last updated on October 23, 2026