v3

latestOpenAPI 3.0.0raw.githubusercontent.com2026-02-14107155281.0 KB

Get container stats based on resource usage

get/containers/{id}/stats

Path parameters

idstring required

Query parameters

streamboolean
one-shotboolean

Response

The request has succeeded.

idstring nullable

ID of the container for which the stats were collected.

namestring nullable

Name of the container for which the stats were collected.

os_typestring nullable

OSType is the OS of the container ("linux" or "windows") to allow platform-specific handling of stats.

readstring date-time

Date and time at which this sample was collected. The value is formatted as RFC 3339 with nano-seconds.

networksobject nullable

Network statistics for the container per interface.

This field is omitted if the container has no networking enabled.

num_procsinteger

The number of processors on the system.

This field is Windows-specific and always zero for Linux containers.

prereadstring date-time

Date and time at which this first sample was collected. This field is not propagated if the "one-shot" option is set. If the "one-shot" option is set, this field may be omitted, empty, or set to a default date (0001-01-01T00:00:00Z).

The value is formatted as RFC 3339 with nano-seconds.