Get the CPU usage of each core, the load average, the memory usage and the number of running jobs. The number of jobs is 0 if the job queue is disabled. You do not need a token for this route.
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())
Response examples (200)
{
"date": "string",
"cpu": {
"percent": [
42.0
],
"loadavg": {}
},
"memory": {
"total": 42.0,
"used": 42.0,
"available": 42.0,
"percent": 42.0
},
"jobs": {
"running_jobs": 42
}
}