These three endpoints give operators and admins access to real-time and historical telemetry data collected from each registered machine. All requests require a valid Bearer token with at least theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Kr-Yogsa/ECE-BOT/llms.txt
Use this file to discover all available pages before exploring further.
operator role. A machine is considered offline when no telemetry has been received within MACHINE_OFFLINE_AFTER_SECONDS (default: 15 seconds).
GET /api/machine-stats/
Returns the most recent telemetry reading for a single machine, along with its current online/offline status.Path parameters
The machine identifier. Accepted values include
cnc, plc, and melfa. The value is normalized to lowercase before lookup.Headers
Bearer token for an operator or admin account. Example:
Bearer <token>.Response
Normalized machine identifier.
Human-readable display name for the machine (e.g.,
"CNC").true when at least one telemetry record exists for this machine.Latest telemetry record.
null when has_data is false.Current online/offline status derived from the latest telemetry timestamp.
200
404
GET /api/machine-stats//dashboard
Returns time-windowed aggregated summaries and a short trend series suitable for rendering charts on the operator dashboard.Path parameters
The machine identifier (e.g.,
cnc, plc, melfa).Headers
Bearer token for an operator or admin account.
Response
Normalized machine identifier.
Human-readable display name.
true when telemetry records exist.Most recent raw telemetry record (same shape as
stats in the single-machine endpoint).Online/offline status (same shape as the single-machine endpoint).
Time-windowed averages. Each key represents a window (e.g., last 1 minute, last 5 minutes) and contains averaged sensor values for that period.
Short ordered series of telemetry records for chart rendering. Each entry has the same shape as a
stats record.200
GET /api/machine-stats//history
Returns a paginated list of recent telemetry records for a machine. Useful for data exports, auditing, and preparing ML datasets.Path parameters
The machine identifier (e.g.,
cnc, plc, melfa).Query parameters
Number of records to return. Accepted range:
1–1000. Values outside this range are clamped automatically.Headers
Bearer token for an operator or admin account.
Response
Normalized machine identifier.
Human-readable display name.
Number of records returned in this response.
Ordered list of telemetry records (most recent first). Each entry has the same shape as a
stats record.Passing a non-numeric
limit value returns a 400 error with {"error": "limit must be a number."}. Out-of-range numeric values are silently clamped to 1–1000.200
400