Vm
API Methods¶
| Method | Action | Description |
|---|---|---|
create_snapshot | create snapshot | Initiates the creation of a snapshot for the specified virtual machine. Returns a task key for status tracking. |
get_snapshot | get snapshot list | Returns a list of snapshots and settings for the specified virtual machine. |
load_stats | load statistics | Initiates the loading of resource usage statistics for the virtual machine. |
remove_snapshot | remove snapshot | Initiates the deletion of a snapshot with the specified name. |
restore_snapshot | restore snapshot | Initiates the restoration of the virtual machine state from a snapshot. |
update_restore_settings | update restore settings | Updates automatic restore and snapshot rotation settings for the specified virtual machine. |
vm/create_snapshot¶
Initiates the creation of a snapshot for the specified virtual machine. Returns a task key for status tracking.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: create_snapshot |
| token | ✅ | string | User authorization token |
| id | ✅ | int | Unique identifier of the virtual machine |
| name | ✅ | string | Snapshot name (allowed characters: a-zA-Z0-9_-.) |
| type | ❌ | string | Snapshot type (default: 'snapshot') |
| num_rotation | ❌ | int | Number of snapshot rotations (optional, value is ignored in the current implementation) |
Example Request
Example of a successful response
vm/get_snapshot¶
Returns a list of snapshots and settings for the specified virtual machine.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: get_snapshot |
| token | ✅ | string | Authorization token |
| id | ✅ | int | Virtual machine identifier |
| type | ❌ | string | Snapshot type (default: 'snapshot') |
Example Request
Example of a successful response
vm/load_stats¶
Initiates the loading of resource usage statistics for the virtual machine.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: load_stats |
| token | ✅ | string | Authorization token |
| id | ✅ | int | Virtual machine identifier |
Example Request
Example of a successful response
vm/remove_snapshot¶
Initiates the deletion of a snapshot with the specified name.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: remove_snapshot |
| token | ✅ | string | Authorization token |
| id | ✅ | int | Virtual machine identifier |
| name | ✅ | string | Name of the snapshot to remove |
| type | ❌ | string | Snapshot type (default: 'snapshot') |
| openstack_id | ❌ | string | Snapshot identifier in OpenStack |
Example Request
Example of a successful response
vm/restore_snapshot¶
Initiates the restoration of the virtual machine state from a snapshot.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: restore_snapshot |
| token | ✅ | string | Authorization token |
| id | ✅ | int | Virtual machine identifier |
| name | ✅ | string | Name of the snapshot to restore |
| type | ❌ | string | Snapshot type (default: 'snapshot') |
| openstack_id | ❌ | string | Snapshot identifier in OpenStack |
Example Request
Example of a successful response
vm/update_restore_settings¶
Updates automatic restore and snapshot rotation settings for the specified virtual machine.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: update_restore_settings |
| token | ✅ | string | User authorization token |
| id | ✅ | int | Unique identifier of the virtual machine |
| type | ❌ | string | Snapshot type (default: snapshot) |
| enable_rotation | ❌ | int | Enable snapshot rotation (1 - yes, 0 - no) |
| exclude_rotation[] | ❌ | array<string> | Array of snapshot names to exclude from rotation |
Example Request