Cua Docs

API Reference

HTTP API reference for Lume server

HTTP API for managing macOS and Linux virtual machines

Documented against Lume 0.3.10. Run lume --version for your installed version.

Default URL#

http://localhost:7777

Start the server with lume serve or specify a custom port with lume serve --port <port>.

VM Management#

List all virtual machines#

List all virtual machines

GET: /lume/vms

Parameters#

NameTypeRequiredDescription
storagestringNoFilter by storage location name

Example Request#

curl "http://localhost:7777/lume/vms"

Response#

  • 200: Success
  • 400: Bad request

Get detailed information about a specific virtual machine#

Get detailed information about a specific virtual machine

GET: /lume/vms/:name

Parameters#

NameTypeRequiredDescription
namestringYesName of the VM
storagestringNoVM storage location to use

Example Request#

curl "http://localhost:7777/lume/vms/my-vm"

Response#

  • 200: Success
  • 400: VM not found or invalid request

Create a new virtual machine#

Create a new virtual machine

POST: /lume/vms

Request Body#

NameTypeRequiredDescription
namestringYesName for the virtual machine
osstringYesOperating system to install (macOS or linux)
cpuintegerYesNumber of CPU cores
memorystringYesMemory size (e.g., 8GB)
diskSizestringYesDisk size (e.g., 50GB)
displaystringYesDisplay resolution (e.g., 1024x768)
ipswstringNoPath to IPSW file or 'latest' for macOS VMs
storagestringNoVM storage location to use

Example Request#

curl -X POST "http://localhost:7777/lume/vms" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "my-vm",
  "os": "macOS",
  "cpu": 4,
  "memory": "8GB",
  "diskSize": "50GB",
  "display": "1024x768"
}'

Response#

  • 200: VM created successfully
  • 400: Invalid request body or VM creation failed

Delete a virtual machine and its associated files#

Delete a virtual machine and its associated files

DELETE: /lume/vms/:name

Parameters#

NameTypeRequiredDescription
namestringYesName of the VM to delete
storagestringNoVM storage location

Example Request#

curl -X DELETE "http://localhost:7777/lume/vms/my-vm"

Response#

  • 200: VM deleted successfully
  • 400: VM not found or deletion failed

Create a copy of an existing virtual machine#

Create a copy of an existing virtual machine

POST: /lume/vms/clone

Request Body#

NameTypeRequiredDescription
namestringYesName of the source VM
newNamestringYesName for the cloned VM
sourceLocationstringNoSource VM storage location
destLocationstringNoDestination VM storage location

Example Request#

curl -X POST "http://localhost:7777/lume/vms/clone" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "my-vm",
  "newName": "example"
}'

Response#

  • 200: VM cloned successfully
  • 400: Clone operation failed

Update virtual machine configuration settings#

Update virtual machine configuration settings

PATCH: /lume/vms/:name

Parameters#

NameTypeRequiredDescription
namestringYesName of the VM to update

Request Body#

NameTypeRequiredDescription
cpuintegerNoNew number of CPU cores
memorystringNoNew memory size (e.g., 16GB)
diskSizestringNoNew disk size (e.g., 100GB)
displaystringNoNew display resolution
storagestringNoVM storage location

Example Request#

curl -X PATCH "http://localhost:7777/lume/vms/my-vm" \
  -H "Content-Type: application/json" \
  -d '{}'

Response#

  • 200: Settings updated successfully
  • 400: Invalid settings or update failed

Start a virtual machine#

Start a virtual machine

POST: /lume/vms/:name/run

Parameters#

NameTypeRequiredDescription
namestringYesName of the VM to start

Request Body#

NameTypeRequiredDescription
noDisplaybooleanNoRun without VNC display (default: false)
sharedDirectoriesarrayNoDirectories to share with the VM
recoveryModebooleanNoBoot macOS VM in recovery mode (default: false)
storagestringNoVM storage location
clipboardbooleanNoEnable bidirectional clipboard sync via SSH (experimental) (default: false)

Example Request#

curl -X POST "http://localhost:7777/lume/vms/my-vm/run" \
  -H "Content-Type: application/json" \
  -d '{}'

Response#

  • 202: VM start initiated (async operation)
  • 400: Invalid request or VM not found

Stop a running virtual machine#

Stop a running virtual machine

POST: /lume/vms/:name/stop

Parameters#

NameTypeRequiredDescription
namestringYesName of the VM to stop

Request Body#

NameTypeRequiredDescription
storagestringNoVM storage location

Example Request#

curl -X POST "http://localhost:7777/lume/vms/my-vm/stop" \
  -H "Content-Type: application/json" \
  -d '{}'

Response#

  • 200: VM stopped successfully
  • 400: Stop operation failed

Image Management#

List available images from local cache#

List available images from local cache

GET: /lume/images

Parameters#

NameTypeRequiredDescription
organizationstringNoOrganization to list images for (default: trycua)

Example Request#

curl "http://localhost:7777/lume/images"

Response#

  • 200: Success
  • 400: Failed to list images

Get the latest macOS restore image (IPSW) URL#

Get the latest macOS restore image (IPSW) URL

GET: /lume/ipsw

Example Request#

curl "http://localhost:7777/lume/ipsw"

Response#

  • 200: Success
  • 400: Failed to get IPSW URL

Pull a VM image from a container registry#

Pull a VM image from a container registry

POST: /lume/pull

Request Body#

NameTypeRequiredDescription
imagestringYesImage to pull (format: name:tag)
namestringNoName for the resulting VM
registrystringNoContainer registry URL (default: ghcr.io)
organizationstringNoOrganization to pull from (default: trycua)
storagestringNoVM storage location

Example Request#

curl -X POST "http://localhost:7777/lume/pull" \
  -H "Content-Type: application/json" \
  -d '{
  "image": "macos-tahoe-vanilla:latest"
}'

Response#

  • 200: Image pulled successfully
  • 400: Pull operation failed

Push a VM image to a container registry#

Push a VM image to a container registry

POST: /lume/vms/push

Request Body#

NameTypeRequiredDescription
namestringYesName of the local VM to push
imageNamestringYesBase name for the image in the registry
tagsarrayYesList of tags to push
registrystringNoContainer registry URL (default: ghcr.io)
organizationstringNoOrganization to push to (default: trycua)
storagestringNoVM storage location
chunkSizeMbintegerNoChunk size for upload in MB (default: 512)

Example Request#

curl -X POST "http://localhost:7777/lume/vms/push" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "my-vm",
  "imageName": "example",
  "tags": [
    "latest"
  ]
}'

Response#

  • 202: Push initiated (async operation)
  • 400: Invalid request

Remove cached images to free up disk space#

Remove cached images to free up disk space

POST: /lume/prune

Example Request#

curl -X POST "http://localhost:7777/lume/prune"

Response#

  • 200: Images pruned successfully
  • 400: Prune operation failed

Configuration#

Get current Lume configuration settings#

Get current Lume configuration settings

GET: /lume/config

Example Request#

curl "http://localhost:7777/lume/config"

Response#

  • 200: Success
  • 400: Failed to get config

Update Lume configuration settings#

Update Lume configuration settings

POST: /lume/config

Request Body#

NameTypeRequiredDescription
homeDirectorystringNoVM home directory path
cacheDirectorystringNoCache directory path
cachingEnabledbooleanNoEnable or disable image caching

Example Request#

curl -X POST "http://localhost:7777/lume/config" \
  -H "Content-Type: application/json" \
  -d '{}'

Response#

  • 200: Configuration updated successfully
  • 400: Invalid request

List all VM storage locations#

List all VM storage locations

GET: /lume/config/locations

Example Request#

curl "http://localhost:7777/lume/config/locations"

Response#

  • 200: Success
  • 400: Failed to get locations

Add a new VM storage location#

Add a new VM storage location

POST: /lume/config/locations

Request Body#

NameTypeRequiredDescription
namestringYesStorage location name
pathstringYesPath to storage directory

Example Request#

curl -X POST "http://localhost:7777/lume/config/locations" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "my-vm",
  "path": "/path/to/storage"
}'

Response#

  • 200: Location added successfully
  • 400: Invalid request or location already exists

Remove a VM storage location#

Remove a VM storage location

DELETE: /lume/config/locations/:name

Parameters#

NameTypeRequiredDescription
namestringYesName of the location to remove

Example Request#

curl -X DELETE "http://localhost:7777/lume/config/locations/my-vm"

Response#

  • 200: Location removed successfully
  • 400: Location not found or cannot be removed

Set the default VM storage location#

Set the default VM storage location

POST: /lume/config/locations/default/:name

Parameters#

NameTypeRequiredDescription
namestringYesName of the location to set as default

Example Request#

curl -X POST "http://localhost:7777/lume/config/locations/default/my-vm"

Response#

  • 200: Default location set successfully
  • 400: Location not found

Logs#

Retrieve Lume server logs#

Retrieve Lume server logs

GET: /lume/logs

Parameters#

NameTypeRequiredDescription
typestringNoLog type: 'info', 'error', or 'all' (default: all)
linesintegerNoNumber of lines to return from end of log

Example Request#

curl "http://localhost:7777/lume/logs"

Response#

  • 200: Success
  • 400: Failed to read logs