- Method:
POST
- Path:
/v1/orgs/{org}/compute/vms/{vm_id}/rescue
- Operation ID:
rescueVm
- Tag: Compute
Send Authorization: Bearer <credential>. The credential is either an API key (vsk_…) created for an organization, or an OIDC access token obtained by signing in to VirtScale.
| Name |
Type |
Required |
Description |
vm_id |
string (uuid) |
Yes |
VirtScale instance id |
org |
string (uuid) |
Yes |
The organization’s id. |
Content type application/json, schema VmRescueRequest, required.
| Field |
Type |
Required |
Enum |
Description |
rescue_image_id |
string, nullable |
No |
|
Not supported yet: leave it out to rescue from the default rescue image. |
| Field |
Type |
Required |
Enum |
Description |
operation |
OperationRef |
Yes |
|
|
operation.attempt |
integer |
Yes |
|
|
operation.created_at |
string (date-time) |
Yes |
|
|
operation.error_class |
string, nullable |
No |
|
|
operation.error_detail |
string, nullable |
No |
|
|
operation.finished_at |
string (date-time), nullable |
No |
|
When the operation reached a terminal state. Guaranteed non-null whenever state is succeeded, failed or cancelled – including operations that complete synchronously and are returned already succeeded. null means the operation is still in flight. |
operation.id |
string (uuid) |
Yes |
|
|
operation.max_attempts |
integer |
Yes |
|
|
operation.resource_id |
string |
Yes |
|
|
operation.resource_type |
string |
Yes |
|
|
operation.state |
string |
Yes |
|
|
operation.type |
string |
Yes |
|
|
vm |
VmOut |
Yes |
|
|
vm.allowed_actions |
array of string |
Yes |
|
What may be asked of this instance where it is, from the vocabulary start, stop, reboot, console, resize, rebuild, rescue, unrescue, delete, firewall, public_ip, protection, in that order. Any action not listed is refused with 409 vm_action_not_allowed. An instance in a region whose disks are single copies on one host allows start, stop, reboot and console only, and start and console only while it is protected; any other instance allows every action, less delete while it is protected. This is policy, not state: a listed action can still be refused for the state the instance is in. |
vm.created_at |
string (date-time) |
Yes |
|
|
vm.desired_state |
string |
Yes |
|
|
vm.disk_gb |
integer |
Yes |
|
|
vm.error_class |
string, nullable |
Yes |
|
|
vm.error_detail |
string, nullable |
Yes |
|
A fixed phrase and a non-identifying context label. Never a vendor exception, endpoint or response body. |
vm.fqdn |
string, nullable |
Yes |
|
Null for a customer account: the zone is VirtScale’s own, and publishing a customer hostname in it would be a namespace nobody asked to share. |
vm.id |
string (uuid) |
Yes |
|
|
vm.image |
ImageRef |
Yes |
|
|
vm.image.glance_id |
string |
Yes |
|
|
vm.image.name |
string |
Yes |
|
|
vm.memory_mb |
integer |
Yes |
|
|
vm.name |
string |
Yes |
|
|
vm.network_profile_id |
string |
Yes |
|
|
vm.observed_addresses |
object, nullable |
Yes |
|
|
vm.observed_at |
string (date-time), nullable |
Yes |
|
|
vm.observed_status |
string, nullable |
Yes |
|
|
vm.org_id |
string (uuid) |
Yes |
|
|
vm.protected |
boolean |
Yes |
|
While true, deleting the instance is refused with 409 vm_protected. An owner of the organization switches it with PUT /v1/orgs/{org}/compute/vms/{vm_id}/protection. |
vm.region_id |
string |
Yes |
|
|
vm.ssh_key_names |
array of string |
Yes |
|
Names of the SSH keys attached to the instance. No key material. |
vm.state |
string |
Yes |
|
|
vm.storage_pool_id |
string |
Yes |
|
|
vm.updated_at |
string (date-time) |
Yes |
|
|
vm.user_data_present |
boolean |
Yes |
|
|
vm.vcpus |
integer |
Yes |
|
|
vm.workload_type |
string |
Yes |
|
|
Every error response is application/problem+json (schema Problem).
| Status |
Meaning |
| 400 |
The request is malformed or failed validation. |
| 401 |
The credential is missing or invalid. |
| 403 |
The credential does not have permission to perform this operation. |
| 404 |
The resource does not exist. |
| default |
Any other status is possible; the code field identifies the error. |
curl -X POST "https://api.virtscale.nl/v1/orgs/$ORG_ID/compute/vms/$VM_ID/rescue" \
-H "Authorization: Bearer $VIRTSCALE_API_KEY" \
-H "Content-Type: application/json" \
--data @body.json