These two endpoints manage the live video stream URL for each machine. Operators and admins can retrieve the current stream URL to embed in the dashboard. Raspberry Pi boot scripts use the update endpoint to publish the active tunnel URL whenever the device restarts.Documentation 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.
The GET endpoint uses Bearer token authentication (operator or admin role). The POST endpoint uses a separate shared secret passed via the
X-Live-Update-Token header, intended for machine-side automation rather than user sessions.GET /api/machine-live/
Returns the configured live stream URL for a machine. When a URL has been saved to the database, it takes priority over any static URL set via environment variable.Path parameters
The machine identifier (e.g.,
cnc, plc, melfa). Normalized to lowercase.Headers
Bearer token for an operator or admin account. Example:
Bearer <token>.Response
Normalized machine identifier.
Human-readable display name (e.g.,
"CNC").true when a stream URL is available. false when no URL has been set in the database or environment.The active stream URL, or
null when is_configured is false.200 — stream configured
200 — not configured
404
POST /api/machine-live//url
Updates the live stream URL for a machine. This endpoint is called by the Raspberry Pi boot script after establishing a Cloudflare tunnel, registering the new public URL so the dashboard reflects the active stream.Path parameters
The machine identifier (e.g.,
cnc, plc, melfa).Headers
Shared secret token. Must match the
MACHINE_LIVE_UPDATE_TOKEN environment variable configured on the server. This is a machine-to-server token and is separate from user Bearer tokens.Body
The new stream URL to register. Must be a valid
http or https URL.Optional label identifying the source of the update (e.g.,
"raspberry_pi").Response
Confirmation message:
"Live stream URL updated successfully."Normalized machine identifier.
Human-readable display name.
The saved stream record as persisted in the database.
200
401
400
503