Get container statistics
GET
/container/{ocid}/stats/{step}
const url = 'https://sylve.lan:8181/api/container/1/stats/example';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://sylve.lan:8181/api/container/1/stats/example \ --header 'Authorization: <Authorization>'Get CPU and memory usage for a container over a window
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”ocid
required
integer
Container ID
step
required
string
Window step
Responses
Section titled “Responses”Success
Media typeapplication/json
object
data
Array<object>
object
containerId
integer
cpuUsage
number
createdAt
string
id
integer
memoryUsage
number
error
string
message
string
status
string
Examplegenerated
{ "data": [ { "containerId": 1, "cpuUsage": 1, "createdAt": "example", "id": 1, "memoryUsage": 1 } ], "error": "example", "message": "example", "status": "example"}