## API Reference
Create VM - POST /vms ```bash curl --connect-timeout 6000 \ --max-time 5000 \ -X POST \ -H "Content-Type: application/json" \ -d '{ "name": "lume_vm", "os": "macOS", "cpu": 2, "memory": "4GB", "diskSize": "64GB", "display": "1024x768", "ipsw": "latest" }' \ http://localhost:3000/lume/vms ```
Run VM - POST /vms/:name/run ```bash # Basic run curl --connect-timeout 6000 \ --max-time 5000 \ -X POST \ http://localhost:3000/lume/vms/my-vm-name/run # Run with VNC client started and shared directory curl --connect-timeout 6000 \ --max-time 5000 \ -X POST \ -H "Content-Type: application/json" \ -d '{ "noDisplay": false, "sharedDirectories": [ { "hostPath": "~/Projects", "readOnly": false } ] }' \ http://localhost:3000/lume/vms/lume_vm/run ```
List VMs - GET /vms ```bash curl --connect-timeout 6000 \ --max-time 5000 \ http://localhost:3000/lume/vms ``` ``` [ { "name": "my-vm", "state": "stopped", "os": "macOS", "cpu": 2, "memory": "4GB", "diskSize": "64GB" }, { "name": "my-vm-2", "state": "stopped", "os": "linux", "cpu": 2, "memory": "4GB", "diskSize": "64GB" } ] ```
Get VM Details - GET /vms/:name ```bash curl --connect-timeout 6000 \ --max-time 5000 \ http://localhost:3000/lume/vms/lume_vm\ ``` ``` { "name": "lume_vm", "state": "running", "os": "macOS", "cpu": 2, "memory": "4GB", "diskSize": "64GB" } ```
Update VM Settings - PATCH /vms/:name ```bash curl --connect-timeout 6000 \ --max-time 5000 \ -X PATCH \ -H "Content-Type: application/json" \ -d '{ "cpu": 4, "memory": "8GB", "diskSize": "128GB" }' \ http://localhost:3000/lume/vms/my-vm-name ```
Stop VM - POST /vms/:name/stop ```bash curl --connect-timeout 6000 \ --max-time 5000 \ -X POST \ http://localhost:3000/lume/vms/my-vm-name/stop ```
Delete VM - DELETE /vms/:name ```bash curl --connect-timeout 6000 \ --max-time 5000 \ -X DELETE \ http://localhost:3000/lume/vms/my-vm-name ```
Pull Image - POST /pull ```bash curl --connect-timeout 6000 \ --max-time 5000 \ -X POST \ -H "Content-Type: application/json" \ -d '{ "image": "macos-sequoia-vanilla:latest", "name": "my-vm-name", "registry": "ghcr.io", "organization": "trycua" }' \ http://localhost:3000/lume/pull ``` ```bash curl --connect-timeout 6000 \ --max-time 5000 \ -X POST \ -H "Content-Type: application/json" \ -d '{ "image": "macos-sequoia-vanilla:15.2", "name": "macos-sequoia-vanilla" }' \ http://localhost:3000/lume/pull ```
Clone VM - POST /vms/:name/clone ```bash curl --connect-timeout 6000 \ --max-time 5000 \ -X POST \ -H "Content-Type: application/json" \ -d '{ "name": "source-vm", "newName": "cloned-vm" }' \ http://localhost:3000/lume/vms/source-vm/clone ```
Get Latest IPSW URL - GET /ipsw ```bash curl --connect-timeout 6000 \ --max-time 5000 \ http://localhost:3000/lume/ipsw ```
List Images - GET /images ```bash # List images with default organization (trycua) curl --connect-timeout 6000 \ --max-time 5000 \ http://localhost:3000/lume/images ``` ```json { "local": [ "macos-sequoia-xcode:latest", "macos-sequoia-vanilla:latest" ] } ```
Prune Images - POST /lume/prune ```bash curl --connect-timeout 6000 \ --max-time 5000 \ -X POST \ http://localhost:3000/lume/prune ```