Robot Metrics
APIs for retrieving KPI and telemetry metrics from robots.
List Available Metrics
- Cloud
- Local
Returns all metric types available for a specific robot.
Endpoint
GET /robots/metrics?robotId={robotId}
Request Headers
{
"authorization": "bearer <access_token>"
}
Query Parameters
- robotId (string): The unique identifier of the robot.
Response Example
{
"metrics": [
{ "metricType": 1, "metricName": "Cpu" },
{ "metricType": 2, "metricName": "Ram" },
{ "metricType": 3, "metricName": "Disk" },
{ "metricType": 4, "metricName": "Battery" },
{ "metricType": 5, "metricName": "Odometry" },
{ "metricType": 6, "metricName": "Traffic" },
{ "metricType": 7, "metricName": "Storage" },
{ "metricType": 8, "metricName": "LicenseExpired" },
{ "metricType": 13, "metricName": "AgentHw" },
{ "metricType": 14, "metricName": "AgentSw" },
{ "metricType": 15, "metricName": "Recordings" },
{ "metricType": 16, "metricName": "Components" },
{ "metricType": 17, "metricName": "Configuration" },
{ "metricType": 18, "metricName": "Position" },
{ "metricType": 19, "metricName": "Network" },
{ "metricType": 20, "metricName": "License" },
{ "metricType": 21, "metricName": "Gpu" },
{ "metricType": 22, "metricName": "Devices" },
{ "metricType": 23, "metricName": "Nav2" },
{ "metricType": 24, "metricName": "RosEntity" },
{ "metricType": 25, "metricName": "Security" },
{ "metricType": 26, "metricName": "RosConfig" },
{ "metricType": 27, "metricName": "Wifi" },
{ "metricType": 28, "metricName": "Ping" },
{ "metricType": 29, "metricName": "RecordingProfileConfig" },
{ "metricType": 30, "metricName": "AgentOperationalState" },
{ "metricType": 31, "metricName": "UserKpiSettingsConfig" },
{ "metricType": 32, "metricName": "Thermal" },
{ "metricType": 33, "metricName": "ResourcesStorage" },
{ "metricType": 34, "metricName": "DockerRegistryConfig" },
{ "metricType": 35, "metricName": "NotificationSettingsConfig" },
{ "metricType": 36, "metricName": "TaskManagerConfig" },
{ "metricType": 37, "metricName": "TaskRunStatus" },
{ "metricType": 38, "metricName": "DebugSettingsConfig" },
{ "metricType": 39, "metricName": "LocalSessionInfo" },
{ "metricType": 40, "metricName": "TaskRunStatusList" },
{ "metricType": 100, "metricName": "Custom" }
]
}
note
The list of available metrics depends on the robot's configuration and what it reports. Not all metric types will appear for every robot.
Returns the metric types known to the local agent.
Endpoint
GET /robots/metrics
Request Headers
{
"authorization": "bearer <local-api-gateway-token>"
}
Response Example
{
"metrics": [
{ "metricType": 1, "metricName": "Cpu" },
{ "metricType": 2, "metricName": "Ram" },
{ "metricType": 100, "metricName": "Custom" }
]
}
Get Robot Metric
- Cloud
- Local
Retrieves the current value of a specific metric for a robot.
Endpoint
GET /robots/{robotId}/metric/{metricId}?metricName={metricName}
Request Headers
{
"authorization": "bearer <access_token>"
}
Path Parameters
- robotId (string): The unique identifier of the robot.
- metricId (int): The numeric metric type ID (from the list above).
Query Parameters
- metricName (string): Required only when
metricIdcorresponds to a custom metric (100). Pass the custom metric name (e.g.,Apples). Leave empty for system metrics.
Response
The response contains the robot's basic data and the metric value. The metric field is polymorphic — its structure depends on the metric type, identified by the $type discriminator.
{
"basicData": {
"id": "11111111-2122-1122-2233-555555319861",
"name": "AMR-9"
},
"metric": {
"$type": 2,
"value": 54.3,
"name": "DoubleMetric"
}
}
Retrieves the current value of a specific metric from the local robot or a configured local-fleet member. Member requests are proxied to that member agent.
Endpoint
GET /robots/{robotId}/metric/{metricId}?metricName={metricName}
Request Headers
{
"authorization": "bearer <local-api-gateway-token>"
}
Path Parameters
- robotId (string): The ID of the local robot or a configured local-fleet member.
- metricId (int): The numeric metric type ID.
Query Parameters
- metricName (string): Optional name filter. Required for custom metrics (
100).
Response Example
{
"basicData": {
"id": "robot-1",
"name": "local-bot"
},
"metric": {
"$type": 2,
"value": 54,
"name": "DoubleMetric"
}
}
Named custom metric example:
GET /robots/robot-1/metric/100?metricName=Apples
{
"basicData": {
"id": "robot-1",
"name": "local-bot"
},
"metric": {
"$type": 3,
"value": "2",
"name": "StringMetric"
}
}
Common Errors
401: bearer token is missing or invalid.404: robot id, metric type, metric value, or named metric was not found.
Metric Types
$type | Name | Value Shape |
|---|---|---|
| 0 | NoneMetric | (no value) |
| 1 | IntMetric | { "value": 42 } |
| 2 | DoubleMetric | { "value": 54.3 } |
| 3 | StringMetric | { "value": "some string" } |
| 4 | BoolMetric | { "value": true } |
| 5 | UsageMetric | { "value": { "used": 2048, "limit": 8192 } } |
| 6 | LicenseExpirationMetric | { "value": "2025-01-01T00:00:00Z" } |
| 7 | AgentSwMetric | { "value": { "updateAvailable": true } } |
| 8 | AgentOperationalStateMetric | { "value": { "agentStatus": 10, "version": "5.4.0" } } |
| 9 | LongMetric | { "value": 9876543210 } |
| 10 | AgentRecordingMetric | see below |
| 11 | ComponentInfoMetric | see below |
| 12 | ConfigInfoMetric | see below |
AgentRecordingMetric Example
{
"$type": 10,
"agentRecordings": {
"agentRecorders": [
{
"recorderType": "rosbag",
"recorderState": "Recording",
"startTime": "2024-09-29T10:00:00Z",
"endTime": "2024-09-29T10:30:00Z",
"id": "rec-001",
"errorType": "",
"duration": "00:30:00"
}
]
},
"name": "AgentRecordingMetric"
}
ComponentInfoMetric Example
{
"$type": 11,
"componentInfosDto": {
"componentsInfoDto": [
{
"componentId": "771793b9-ac7e-4b8e-8b6e-d5b84e5ba19d",
"componentUuid": "76c57d0f-e964-4082-81da-7d8f4861738b",
"version": "1.0.2",
"componentName": "Cogniteam/data-publisher-ros2-humble",
"componentState": "Active"
}
]
},
"name": "ComponentInfoMetric"
}
ConfigInfoMetric Example
{
"$type": 12,
"configInfoDto": {
"configName": "default-config",
"version": "1.0.8",
"configState": "Ready"
},
"name": "ConfigInfoMetric"
}