Container Metrics
Get container CPU usage history
Retrieve CPU usage history for a specific Docker container
get/api/container/{containerId}/cpu/history
Path parameters
containerIdstring required
Docker container ID (alphanumeric characters only)
Query parameters
fromstring date-time
Start date in ISO 8601 format (UTC timezone). If not provided, defaults to 1970-01-01T00:00:00Z.
tostring date-time
End date in ISO 8601 format (UTC timezone). If not provided, defaults to current time.
Response
Container CPU usage history
Example response
[
{
"time": "1700000000000",
"percent": "12.5",
"human_friendly_time": "2024-01-15T10:00:00Z"
}
]