Telemetry
Read-only channel stream during a live run
During a campaign, instrumented channels are published on a single endpoint. It is a WebSocket stream only — there is no polling variant, and no REST snapshot. Clients connect once and receive frames for the run's duration.
| Item | Value |
|---|---|
| Endpoint | /api/v1/telemetry |
| Scheme | wss over TLS 1.2+ |
| Methods | GET only, with a WebSocket upgrade |
| Frame format | JSON, one object per flush interval |
| Flush interval | 250 ms for rail/current, 1 s for thermal |
| Auth | Per-campaign token issued with the run ID; revoked at report issue |
Handshake
// non-browser client GET /api/v1/telemetry HTTP/1.1 Host: rock.m-geniotek.com Upgrade: websocket Connection: Upgrade Sec-WebSocket-Version: 13 Sec-WebSocket-Key: <base64 nonce> Sec-WebSocket-Protocol: telemetry.v1, <campaign-token> // 101 Switching Protocols — frames follow until the run ends
Frame shape
{
"run": "RK-24108",
"t": 1725950412.250,
"ch": {
"rail.ch3": 11.72,
"temp.chamber": 84.9,
"unit.1.i": 0.412
},
"flags": []
}
Ordinary HTTP requests do not return data. A plain GET
against this path is answered with a 400 and the error body shown below,
because the endpoint only speaks the upgrade. This is deliberate: it keeps the
stream on one code path and makes an accidental poll from a script fail loudly
instead of returning an empty array that looks like a quiet run.
Error codes
What a failed connection returns
Error bodies are JSON on application/json. The
error field is stable and safe to switch on.
| Status | error | When |
|---|---|---|
| 400 | upgrade_required |
The request reached the endpoint without a WebSocket upgrade header |
| 400 | upgrade_required |
Upgrade requested with a non-websocket Upgrade value |
| 405 | method_not_allowed |
Any method other than GET or HEAD |
| 403 | token_invalid |
Campaign token absent, expired, or revoked at report issue |
| 404 | run_not_found |
Run ID not currently streaming |
400 body
{
"error": "upgrade_required",
"message": "telemetry endpoint streams over websocket; see /telemetry for the handshake spec",
"request_id": "<hex>"
}
405 body
{
"error": "method_not_allowed",
"message": "telemetry accepts GET websocket upgrades only"
}
Reproduce the 400. No token needed:
curl -i https://rock.m-geniotek.com/api/v1/telemetry
returns the body above with a fresh request_id.
Quote that ID when reporting a connection problem so it can be matched
against the run log.
Channels
Channel naming
Naming is positional and stable for the life of a campaign.
- rail.<n>Supply rail voltage, unit index in the fixture
- unit.<n>.iUnit current draw, averaged over the flush interval
- temp.chamberChamber air temperature at the control thermocouple
- temp.unit.<n>.<k>Unit-attached thermocouple k
- acc.<axis>Acceleration during shock and vibration runs only
- eventBench script markers: ramp start, dwell start, door open