Skip to navigation

Delete a cloud VM

Deletes a cloud VM. Returns an operation you can poll for status. A VM with an automatically assigned public IP needs public_ip_action in the body. If the VM’s IP is already a Reserved IP, send no body: release and reserve are both refused with 400. The IP stays in the workspace and keeps billing until you release it from Reserved IPs. Asynchronous: the response carries operation_id; poll GET /compute/operations/{operation_id} until status is succeeded, failed, cancelled or timed_out. If your client times out, read the status; never resubmit the request. Requires scope: vm.write.

# Example request with curl (set IBEE_API_TOKEN to a platform API token and WORKSPACE_ID to the workspace first).
# VM_ID: Virtual machine ID
curl -X DELETE "https://api.ibee.ai/v1/compute/cloud-vms/$VM_ID?workspace_id=$WORKSPACE_ID" \
-H "Authorization: Bearer $IBEE_API_TOKEN" \
-H "X-Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"public_ip_action": "reserve", "reserved_ip_label": "<reserved_ip_label>"}'

Authentication

AuthorizationBearer

IBEE platform API token. Production tokens start with ibee_prod_key_; development tokens start with ibee_dev_key_. Use a token only with its matching gateway environment.

Path parameters

vm_idstringRequired
Virtual machine ID.

Headers

X-Idempotency-KeystringRequired
Unique key used to safely retry write operations.

Query parameters

workspace_idstringRequiredformat: "^[1-9][0-9]*$">=1 character

The positive numeric workspace ID to scope this request to. Zero, negative, and non-numeric values are rejected.

Request

This endpoint expects an object.
public_ip_actionenum or nullOptional

What to do with the VM’s automatically assigned public IP. reserve converts it to a Reserved IP in this workspace; release releases it with the VM. Required when the VM has an automatically assigned public IP. reserve on a VM without one is refused with 400. If the IP has already been converted to a Reserved IP, release and reserve are both refused with 400: delete with no body to keep the IP, then release it from Reserved IPs to stop its billing.

Allowed values:
reserved_ip_labelstring or nullOptional<=120 characters

Label for the Reserved IP that reserve creates. Blank is treated as not set.

reserved_ip_billing_catalogobject or nullOptional

Billing catalog identifiers used to bill the Reserved IP that reserve creates. Required with public_ip_action: reserve, with a non-empty sku_id; refused with 400 otherwise.

Response

VM deletion accepted.
operation_idstring
ID of the queued operation.
vm_idstring
ID of the VM the operation acts on.
statusstring

Always accepted.

submitted_atdatetime

When the operation was accepted (ISO 8601).

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
413
Content Too Large Error
422
Unprocessable Entity Error
423
Locked Error
429
Too Many Requests Error
500
Internal Server Error
502
Bad Gateway Error
503
Service Unavailable Error
504
Gateway Timeout Error