Skip to main content
Get current system metrics for the sandbox including CPU, memory, and disk usage.

Endpoint

GET /system

Request

Headers

Authorization: Bearer YOUR_JWT_TOKEN

Example Request

curl https://sandbox_abc123xyz.hopx.dev/system \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Response

Success (200 OK)

{
  "os": {
    "name": "Ubuntu 22.04.5 LTS",
    "version": "22.04.5 LTS (Jammy Jellyfish)",
    "kernel": "5.10.186",
    "arch": "amd64",
    "hostname": "169.254.0.22",
    "timezone": "Etc/UTC"
  },
  "hardware": {
    "cpu_cores": 2,
    "cpu_model": "AMD EPYC",
    "memory_mb": 1995,
    "disk_mb": 19987
  },
  "network": {
    "interfaces": [
      {
        "name": "eth0",
        "ip": "192.168.1.100",
        "mac": "02:fc:00:00:00:1c"
      }
    ],
    "hostname": "169.254.0.22"
  },
  "environment": {
    "shell": "",
    "path": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
    "user": "",
    "home": "",
    "working_dir": "/",
    "environment": {
      "LANG": "C.UTF-8",
      "TERM": "linux"
    }
  },
  "capabilities": [
    "Go",
    "Git",
    "Curl",
    "Nano",
    "Make",
    "Wget",
    "Vim",
    "Bash",
    "GCC",
    "Pip",
    "NPM",
    "Python",
    "Node.js"
  ]
}

Response Fields

FieldTypeDescription
osobjectOperating system information
os.namestringOS name and version
os.kernelstringKernel version
os.archstringSystem architecture
hardwareobjectHardware specifications
hardware.cpu_coresintegerNumber of CPU cores
hardware.cpu_modelstringCPU model
hardware.memory_mbintegerTotal memory in MB
hardware.disk_mbintegerTotal disk space in MB
networkobjectNetwork configuration
network.interfacesarrayNetwork interfaces
environmentobjectEnvironment configuration
environment.pathstringSystem PATH
capabilitiesarrayInstalled software and tools

Status Codes

CodeDescription
200Success
401Unauthorized

Use Cases

Get System Information

curl -s https://sandbox_abc123xyz.hopx.dev/system \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" | \
  jq '{os: .os.name, cpu_cores: .hardware.cpu_cores, memory_mb: .hardware.memory_mb}'

Check Hardware Specs

curl https://sandbox_abc123xyz.hopx.dev/system \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" | \
  jq '.hardware'

List Installed Capabilities

curl https://sandbox_abc123xyz.hopx.dev/system \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" | \
  jq '.capabilities[]'

Check OS Version

OS=$(curl -s https://sandbox_abc123xyz.hopx.dev/system \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" | jq -r '.os.name')

echo "Operating System: $OS"

Get Network Configuration

curl https://sandbox_abc123xyz.hopx.dev/system \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" | \
  jq '.network.interfaces[]'

Next Steps