Get Robot State Timeline
GET/api/v1/analytics/robot-state-timeline
Time-weighted distribution of the seven robot states over a window. The server reads raw state events from event_analytics, carries the last known state forward across gaps, measures the time spent in each state, and returns finished durations, percentages and timeline segments — the client does no math.
Request
Query Parameters
start_timestamp stringrequired
Mandatory. Inclusive window start — ISO 8601 datetime or epoch milliseconds. Typically local midnight (12:00 AM) of the selected day.
end_timestamp stringrequired
Mandatory. Inclusive window end — ISO 8601 datetime or epoch milliseconds. now() for the current day, or the next local midnight (12:00 AM) for a past day.
Responses
- 200
- 400
- 500
Successful response with the robot state timeline
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- Array [
- ]
- ]
success booleanrequired
message stringrequired
data objectrequired
window objectrequired
start stringrequired
end stringrequired
elapsed_ms numberrequired
tracked_ms numberrequired
coverage_pct numberrequired
states object[]required
key stringrequired
val numberrequired
duration_ms numberrequired
percentage numberrequired
segments object[]required
start stringrequired
end stringrequired
duration_ms numberrequired
status numberrequired
{
"success": true,
"message": "string",
"data": {
"window": {
"start": "string",
"end": "string",
"elapsed_ms": 0,
"tracked_ms": 0,
"coverage_pct": 0
},
"states": [
{
"key": "string",
"val": 0,
"duration_ms": 0,
"percentage": 0,
"segments": [
{
"start": "string",
"end": "string",
"duration_ms": 0
}
]
}
]
},
"status": 0
}
Invalid time range
- application/json
- Schema
- Example (from schema)
Schema
success booleanrequired
message stringrequired
data nullrequired
status numberrequired
{
"success": true,
"message": "string",
"status": 0
}
Internal server error
- application/json
- Schema
- Example (from schema)
Schema
success booleanrequired
message stringrequired
data nullrequired
status numberrequired
{
"success": true,
"message": "string",
"status": 0
}
Loading...