Update instance properties
/instances/{id}
Update mutable properties of a running instance. Currently supports updating only the environment variables referenced by existing credential policies, enabling secret/key rotation without instance restart.
Path Parameters
id: string
Body Parameters
env: optional map[string]
Environment variables to update (merged with existing).
Only keys referenced by the instance's existing credential source.env bindings
are accepted. Use this to rotate real credential values without restarting the VM.
Returns
Update instance properties
curl http://localhost:8080/instances/$ID \
-X PATCH \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $HYPEMAN_API_KEY" \
-d '{
"env": {
"OUTBOUND_OPENAI_KEY": "new-rotated-key-456"
}
}'
{
"id": "tz4a98xxat96iws9zmbrgj3a",
"created_at": "2025-01-15T10:30:00Z",
"image": "docker.io/library/alpine:latest",
"name": "my-workload-1",
"state": "Created",
"disk_io_bps": "100MB/s",
"env": {
"foo": "string"
},
"exit_code": 137,
"exit_message": "killed by signal 9 (SIGKILL)",
"gpu": {
"mdev_uuid": "aa618089-8b16-4d01-a136-25a0f3c73123",
"profile": "L40S-1Q"
},
"has_snapshot": false,
"hotplug_size": "2GB",
"hypervisor": "cloud-hypervisor",
"network": {
"bandwidth_download": "125MB/s",
"bandwidth_upload": "125MB/s",
"enabled": true,
"ip": "192.168.100.10",
"mac": "02:00:00:ab:cd:ef",
"name": "default"
},
"overlay_size": "10GB",
"size": "2GB",
"started_at": "2025-01-15T10:30:05Z",
"state_error": "failed to query VMM: connection refused",
"stopped_at": "2025-01-15T12:30:00Z",
"tags": {
"team": "backend",
"env": "staging"
},
"vcpus": 2,
"volumes": [
{
"mount_path": "/mnt/data",
"volume_id": "vol-abc123",
"overlay": true,
"overlay_size": "1GB",
"readonly": true
}
]
}
Returns Examples
{
"id": "tz4a98xxat96iws9zmbrgj3a",
"created_at": "2025-01-15T10:30:00Z",
"image": "docker.io/library/alpine:latest",
"name": "my-workload-1",
"state": "Created",
"disk_io_bps": "100MB/s",
"env": {
"foo": "string"
},
"exit_code": 137,
"exit_message": "killed by signal 9 (SIGKILL)",
"gpu": {
"mdev_uuid": "aa618089-8b16-4d01-a136-25a0f3c73123",
"profile": "L40S-1Q"
},
"has_snapshot": false,
"hotplug_size": "2GB",
"hypervisor": "cloud-hypervisor",
"network": {
"bandwidth_download": "125MB/s",
"bandwidth_upload": "125MB/s",
"enabled": true,
"ip": "192.168.100.10",
"mac": "02:00:00:ab:cd:ef",
"name": "default"
},
"overlay_size": "10GB",
"size": "2GB",
"started_at": "2025-01-15T10:30:05Z",
"state_error": "failed to query VMM: connection refused",
"stopped_at": "2025-01-15T12:30:00Z",
"tags": {
"team": "backend",
"env": "staging"
},
"vcpus": 2,
"volumes": [
{
"mount_path": "/mnt/data",
"volume_id": "vol-abc123",
"overlay": true,
"overlay_size": "1GB",
"readonly": true
}
]
}