Skip to navigation

Update a cloud VM backup policy

Updates a cloud VM’s automated backup schedule and retention settings. 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 PATCH "https://api.ibee.ai/v1/compute/cloud-vms/$VM_ID/backups/policy?workspace_id=$WORKSPACE_ID" \
-H "Authorization: Bearer $IBEE_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"schedule": {"frequency": "hourly", "timezone": "UTC"}, "retention_days": 1}'

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.

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.
scheduleobjectOptional

When a backup policy runs. Times are interpreted in timezone.

retention_daysinteger or nullOptional1-365

Days a backup run is kept before it is expired (1-365).

full_backup_interval_daysinteger or nullOptional1-30

Days between full backups (1-30).

incremental_enabledboolean or nullOptional
Whether runs between full backups capture only changes.

Response

Backup policy updated successfully.
organization_idstring
ID of the organization that owns the VM.
workspace_idstring
ID of the workspace the VM belongs to.
policy_idstring
Unique ID of the backup policy.
vm_idstring
ID of the VM the policy protects.
enabledboolean
Whether scheduled runs are active.
scheduleobject

When a backup policy runs. Times are interpreted in timezone.

retention_daysinteger
Days a backup run is kept before it is expired.
full_backup_interval_daysinteger
Days between full backups.
incremental_enabledboolean
Whether runs between full backups capture only changes.
storage_backendstring
Identifier of the storage backend that holds the captured data.
created_atdatetime

When the policy was created (ISO 8601).

updated_atdatetime

When the policy was last changed (ISO 8601).

organization_namestring or nullOptional
Display name of the owning organization, when the service has it.
workspace_namestring or nullOptional
Display name of the workspace, when the service has it.
vm_namestring or nullOptional
Display name of the VM, as recorded on the policy.
os_typestring or nullOptional

OS family of the VM (linux or windows), as recorded on the policy.

os_distrostring or nullOptional
OS distribution of the VM, as recorded on the policy.
template_idstring or nullOptional
Template the VM was created from, as recorded on the policy.
next_run_atdatetime or nullOptional

When the next scheduled run is due; null when none is scheduled.

last_run_atdatetime or nullOptional

When the most recent run started; null before the first run.

last_statusenumOptional

Lifecycle status of a backup run, snapshot set or restore.

  • queued: accepted and waiting to start.
  • running: in progress.
  • succeeded: finished; the recovery point is usable.
  • failed: stopped with an error (see error_message).
  • cancelled: stopped before it completed.
  • deleting: remote backup deletion is in progress; the run becomes unavailable after cleanup.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found 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