Payload
Optional JSON
Send a JSON object with the ping. Gonewatch keeps top-level scalars — numbers, strings, booleans, and null — and shows them as last values and charts. Nested objects, arrays, and log blobs are dropped.
Examples
Keys are yours. These are typical fields from real jobs, not a required schema.
Nightly backup
cURL
curl -fsS -X POST https://gonewatch.com/api/heartbeat/YOUR_TOKEN \
-H "Content-Type: application/json" \
-d '{"duration_ms":184320,"bytes":2147483648,"tables":42}'Cron / cert renew
cURL
curl -fsS -X POST https://gonewatch.com/api/heartbeat/YOUR_TOKEN \
-H "Content-Type: application/json" \
-d '{"duration_ms":2310,"renewed":0}'Report / pipeline
Node.js
await fetch("https://gonewatch.com/api/heartbeat/YOUR_TOKEN", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({"duration_ms":41200,"rows":15832,"failed":0}),
});Python
backup.py
import requests
requests.post(
"https://gonewatch.com/api/heartbeat/YOUR_TOKEN",
json={"duration_ms":184320,"bytes":2147483648,"tables":42},
)What we keep
- JSON object at the root (not an array or a single string).
- Top-level values that are a finite number, string, boolean, or
null. - Any key names you choose —
duration_ms,bytes,rows,run_id, and so on.
What we drop
Nested objects, arrays, non-finite numbers, and oversized strings are not stored. The heartbeat still counts. The response tells you which keys were ignored and why — useful when you test with cURL. We do not persist those warnings, and we do not show them later on the monitor.
response.json
{
"ok": true,
"status": "up",
"payload": {
"stored": { "duration_ms": 184320, "bytes": 2147483648 },
"ignored": {
"log": "not a top-level scalar",
"meta": "not a top-level scalar"
}
}
}Do not send
Charts
The monitor page charts numeric keys found in the plan history window, up to eight series. Extra numeric fields still appear in last payload and in expandable history rows. Strings and booleans are listed, not charted.
How numbers are displayed
We store the number you sent. The dashboard only formats it for reading. Matching is by key name, not by guessing the value. Custom units can come later.
| Key | Stored | Shown as |
|---|---|---|
| duration_ms or *_ms | 184320 | Milliseconds → 3m 4s (184320 ms = 3 minutes and 4 seconds) |
| bytes or *_bytes | 2147483648 | Binary bytes → 2 GB (1024-based) |
| any other number | 15832 | Grouped digits → 15,832 |
rows, tables, and failed stay ordinary numbers. A key named wait_ms is treated as milliseconds because it ends in _ms.