vm.php¶
Virtual Machine (VM) management module providing an API for creating, retrieving, deleting, and restoring snapshots, as well as loading statistics.
API Methods¶
| Method | Action | Description |
|---|---|---|
create_snapshot | create snapshot | Creates a new snapshot of the specified virtual machine. |
get_snapshot | get snapshot | Retrieves information about a specific VM snapshot by its ID. |
load_stats | get vm stats | Loads statistical information for a specific virtual machine or server group. |
remove_snapshot | remove snapshot | Removes a specific snapshot from the virtual machine. |
restore_snapshot | restore snapshot | Restores a virtual machine to a previously saved snapshot state. |
update_restore_settings | update restore settings | Updates the restoration configuration settings for a specific virtual machine. |
vm/create_snapshot¶
Creates a new snapshot of the specified virtual machine.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | The action to perform (create_snapshot) |
| token | ✅ | string | Authentication token for API access |
| id | ❌ | int | ID of the virtual machine for which the snapshot will be created |
Example Request
Example of a successful response
vm/get_snapshot¶
Retrieves information about a specific VM snapshot by its ID.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | The action to perform (get_snapshot) |
| token | ✅ | string | Authentication token for the request |
| id | ✅ | integer | The ID of the snapshot to retrieve |
| type | ✅ | string | Parameter type (detected in code) |
Example Request
Example of a successful response
vm/load_stats¶
Loads statistical information for a specific virtual machine or server group.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | The action to perform (load_stats) |
| token | ✅ | string | Authentication token |
| id | ❌ | integer | ID of the virtual machine or server |
Example Request
Example of a successful response
vm/remove_snapshot¶
Removes a specific snapshot from the virtual machine.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | The action to perform (remove_snapshot) |
| token | ✅ | string | Authentication token for API access |
| id | ✅ | int | ID of the resource or VM |
Example Request
Example of a successful response
vm/restore_snapshot¶
Restores a virtual machine to a previously saved snapshot state.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| token | ✅ | string | Authentication token for the request |
| id | ❌ | int | The ID of the virtual machine or snapshot to restore |
Example Request
Example of a successful response
vm/update_restore_settings¶
Updates the restoration configuration settings for a specific virtual machine.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| token | ✅ | string | Authentication token |
| id | ✅ | int | The ID of the virtual machine |
| type | ✅ | string | Parameter type (detected in code) |
| enable_rotation | ✅ | boolean | Whether to enable rotation |
| exclude_rotation | ✅ | array | List of IDs to exclude from rotation |
Example Request