Get Virtualizor

Delete ISO

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

NameMethodValueDescriptionRequired
actGETisoThe action specified to perform operation and retrieve dataYes
deletePOSTtextThe name of the iso file to be deleted. For deleting multiple ISOs pass in the filenames as comma separated valuesYes

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"
}
    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list