ReferenceREST API

State

REST API: Sensors, joints, battery, temperatures. Generated from the OpenAPI document.

Latest full state

GET /v1/state

Sensors, joints (position, temperature, current), battery, IMU, sonar, foot pressure and touch, as last reported by the robot (20 per second). Units are on Body sensors and units.

Token: required · Lease: not needed

StatusMeaningBody
200The latest stateRobotState
401Missing or wrong tokenErrorBody
503No state yetErrorBody
curl -H "Authorization: Bearer $TOKEN" http://$ROBOT:7702/v1/state

Stream the state

GET /v1/state/stream

Server-Sent Events: one state event with a RobotState per period. Browsers can pass the token as ?access_token=.

Token: required · Lease: not needed

ParameterInTypeRequiredMeaning
ratequerynumbernoStates per second, 0.1 to 20 (default 10). (0.1 to 20)
StatusMeaningBody
200Server-Sent Events, event: state with a RobotState as datatext/event-stream
401Missing or wrong tokenErrorBody
422Invalid rateErrorBody
503Too many streams openErrorBody
curl -N -H "Authorization: Bearer $TOKEN" "http://$ROBOT:7702/v1/state/stream?rate=2"

On this page