API Reference

Technical details for the Cntrl HTTP endpoints.

Cntrl exposes a simple RESTful API. All endpoints are prefixed with /api.

Base URL

By default, the API is available at: http://<YOUR_PC_IP>:9990

Custom Ports

9990 is the default port. If you changed the port during installation or in the config.yaml file, make sure to use your custom port here.

Endpoints

System Health

MethodEndpointDescription
GET/api/statusReturns {"status": "ok"} if the server is healthy.

Statistics

MethodEndpointDescription
GET/api/statsReturns full system stats (CPU, GPU, RAM, Disk, Hostname).
GET/api/stats/memoryReturns detailed RAM usage.
GET/api/stats/cpuReturns current CPU load and core information.
GET/api/stats/diskReturns drive space and partition info.

Power Control

MethodEndpointDescription
POST/api/pw/shutdownInitiates a system shutdown.
POST/api/pw/restartInitiates a system restart.
POST/api/pw/sleepPuts the system into sleep mode.
POST/api/pw/hibernatePuts the system into hibernation.

Power commands return a success response before the system action is triggered to ensure the remote client receives confirmation.

Response Schema

Full Statistics (GET /api/stats)

Example JSON response:

{
    "memory": {
        "total": 34268311552,
        "used": 12456789012,
        "free": 21811522540,
        "usedPercent": 36.35
    },
    "cpu": {
        "manufacturer": "Intel",
        "brand": "Core™ i9-14900K",
        "cores": 32,
        "physicalCores": 24,
        "speed": 3.2,
        "currentLoad": 12.5
    },
    "gpu": {
        "vendor": "NVIDIA",
        "model": "NVIDIA GeForce RTX 4070 Ti SUPER",
        "vram": 16384,
        "vramUsed": 1024,
        "temperatureGpu": 42,
        "utilizationGpu": 5
    },
    "disks": [
        {
            "fs": "C:",
            "type": "NTFS",
            "size": 1024000000000,
            "used": 450000000000,
            "available": 574000000000,
            "usedPercent": 43.95,
            "mount": "C:"
        }
    ],
    "uptime": 86400,
    "hostname": "MY-GAMING-PC",
    "platform": "win32"
}

On this page