Get CPU usage for each core, memory repartition and number of jobs in the job queue.
GET
/status/resources
curl
curl -X GET "http://api.example.com/status/resources" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
import requests
url = "http://api.example.com/status/resources"
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
params = {}
payload = None
response = requests.get(
url,
headers=headers,
params=params,
json=payload
)
response.raise_for_status()
if response.content:
print(response.json())
curl \
--request GET 'http://api.example.com/status/resources' \
--header "Authorization: $API_KEY"
Response examples (200)
{
"date": "2023-12-07T10:30:00.000Z",
"cpu": {
"percent": [
25.5,
30.2,
28.1
],
"loadavg": {
"last 1 min": 0.75,
"last 5 min": 0.82,
"last 10 min": 0.78
}
},
"memory": {
"total": 8589934592,
"used": 4294967296,
"available": 4294967296,
"percent": 50.0
},
"jobs": {
"running_jobs": 3
}
}