GET /status/resources

Get CPU usage for each core, memory repartition and number of jobs in the job queue.

Responses

  • 200 application/json

    CPU, memory and jobs stats

    Hide response attributes Show response attributes object
    • date string(date-time)
    • cpu object
      Hide cpu attributes Show cpu attributes object
      • percent array[number]
      • loadavg object
        Hide loadavg attributes Show loadavg attributes object
        • last 1 min number
        • last 5 min number
        • last 10 min number
    • memory object
      Hide memory attributes Show memory attributes object
      • total integer
      • used integer
      • available integer
      • percent number
    • jobs object
      Hide jobs attribute Show jobs attribute object
      • running_jobs integer
GET /status/resources
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
  }
}