Skip to main content

Robot Metrics

APIs for retrieving KPI and telemetry metrics from robots.


List Available Metrics​

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.


Get Robot Metric​

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 metricId corresponds 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"
}
}

Metric Types​

$typeNameValue Shape
0NoneMetric(no value)
1IntMetric{ "value": 42 }
2DoubleMetric{ "value": 54.3 }
3StringMetric{ "value": "some string" }
4BoolMetric{ "value": true }
5UsageMetric{ "value": { "used": 2048, "limit": 8192 } }
6LicenseExpirationMetric{ "value": "2025-01-01T00:00:00Z" }
7AgentSwMetric{ "value": { "updateAvailable": true } }
8AgentOperationalStateMetric{ "value": { "agentStatus": 10, "version": "5.4.0" } }
9LongMetric{ "value": 9876543210 }
10AgentRecordingMetricsee below
11ComponentInfoMetricsee below
12ConfigInfoMetricsee 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"
}