Skip to main content

Attributes API

Endpoint for retrieving robot attribute values.

Get Robot Attribute​

GET /api/robots/{robotId}/attributes/{attributeId}

Returns the current value of a specific attribute for a robot.

Path Parameters​

ParameterDescription
robotIdUnique robot identifier
attributeIdAttribute identifier (as defined in DataSourceDefinitions)

Response​

{
"attribute": "battery_level",
"value": "87",
"ts": 1710000000000
}

Response Fields​

FieldTypeDescription
attributestringThe attribute ID that was queried
valuenumber | string | objectCurrent attribute value (objects for json/yaml data sources)
tsnumberTimestamp of the last value update (epoch milliseconds)

If the attribute is defined but the robot has never reported it, the response is 200 with only the attribute field (value and ts are omitted).

Errors​

StatusCondition
403User lacks view access to this robot
404Attribute is not defined for this robot

Example​

curl -H "x-auth-api-key: YOUR_KEY" \
http://localhost:3000/api/robots/robot_abc123/attributes/battery_level

How Attributes are Defined​

Attributes are created through DataSourceDefinition objects via the ConfigAPI. A DataSourceDefinition maps telemetry data to a named attribute that can then be queried through this endpoint.

See Attributes & Status for a practical guide.