Get Engine Heartbeat
GET /api/system/heartbeat
Get engine heartbeat data for Operator Console.
Returns engine heartbeat information including uptime, PID, build ID, and tick counter.
This endpoint exposes the same data available in-process via instrument.get_heartbeat().
Returns:
tick(int): Monotonic tick counter (incremented by beat())pid(int): Engine process IDbuild(str): Build ID (git commit hash or “dev-unknown”)start_time(float): Engine start timestampuptime(float): Engine uptime in secondslast_beat(float): Timestamp of last heartbeat beat() call
Example Response:
{
"tick": 1234,
"pid": 12345,
"build": "2aae3712",
"startTime": 1704900000.0,
"uptime": 1234.5,
"lastBeat": 1704901234.5
}
Raises:
- HTTPException(503): If instrumentation layer is not available
- HTTPException(500): If heartbeat retrieval fails
Use Cases:
- Operator Console standalone mode
- External monitoring tools
- Health check systems
Responses
Section titled “ Responses ”Successful Response
Response model for engine heartbeat data.
Provides engine heartbeat information including uptime, PID, build ID, and tick counter. Used by instrument_routes for exposing instrumentation layer heartbeat data to Operator Console.
Fields:
tick: Monotonic tick counter (required, integer)pid: Engine process ID (required, integer)build: Build ID (required, string)start_time: Engine start timestamp (required, float)uptime: Engine uptime in seconds (required, float)last_beat: Timestamp of last heartbeat beat() call (required, float)
Usage: GET /api/system/heartbeat returns this response model.
JSON Example:
{
"tick": 1234,
"pid": 12345,
"build": "2aae3712",
"startTime": 1704900000.0,
"uptime": 1234.5,
"lastBeat": 1704901234.5
}object
Monotonic tick counter (incremented by beat())
Engine process ID
Build ID (git commit hash or ‘dev-unknown’)
Engine start timestamp
Engine uptime in seconds
Timestamp of last heartbeat beat() call