Use the Delete ISO API to delete ISO image from the server. The API response will contain "done" as the array of the deleted ISO information.
HTTP Request
https://hostname:4085/index.php?act=iso
Parameters
Name | Method | Value | Description | Required |
---|---|---|---|---|
act | GET | iso | The action specified to perform operation and retrieve data | Yes |
delete | POST | text | The name of the iso file to be deleted. For deleting multiple ISOs pass in the filenames as comma separated values | Yes |
Sample Code
<?php
require_once('/usr/local/virtualizor/sdk/admin.php');
$key = 'your_api_key';
$pass = 'your_api_pass';
$ip = 'your_server_ip';
$admin = new Virtualizor_Admin_API($ip, $key, $pass);
$post = array();
$post['delete'] = 'kali_linux1.iso';
$post['delete'] = 'kali_linux4.iso, kali_linux5.iso'; // for deleting multiple values
$output = $admin->deleteiso($post);
print_r(json_encode($output));
?>
Output
{
"title": "ISO",
"done": {
"kali_linux4": {
"uuid": "3lj93ipm8scufqea",
"iso": "kali_linux4.iso",
"mg": null
},
"kali_linux5": {
"uuid": "9j1gmmazc0tnd1j0",
"iso": "kali_linux5.iso",
"mg": null
}
},
"time_taken": "0.266"
}