API List ISO

From Virtualizor Wiki
Jump to: navigation, search

Get list of ISOs


Example Code:

<?php

    require_once('admin.php');

    $key =  'uketenhrhpunty5lhgwkcuxxxxxxxxxx';

    $pass = 'yrsofc3tg3tre7bjpfppspxxxxxxxxxx';

    $ip = 'xxx.xxx.xxx.xxx';

    $admin = new Virtualizor_Admin_API($ip, $key, $pass);

    $output = $admin->$admin->iso();
    
    print_r($output);

?>

Returns:

Array
(
    [title] => ISO
    [isos] => Array
        (
            [elementaryos-stable-amd64.20130810.iso] => Array
                (
                    [name] => elementaryos-stable-amd64.20130810.iso
                    [filename] => elementaryos-stable-amd64.20130810.iso
                    [size] => 727711744
                    [distro] => others
                )

            [en_windows_8_1_pro_vl_x64_dvd_2971948.iso] => Array
                (
                    [name] => en_windows_8_1_pro_vl_x64_dvd_2971948.iso
                    [filename] => en_windows_8_1_pro_vl_x64_dvd_2971948.iso
                    [size] => 3852142592
                    [distro] => others
                )

            [nuCDP-CentOS-LiveCD.iso] => Array
                (
                    [name] => nuCDP-CentOS-LiveCD.iso
                    [filename] => nuCDP-CentOS-LiveCD.iso
                    [size] => 877658112
                    [distro] => centos
                )

            [CentOS-6.5-x86_64-bin-DVD1.iso] => Array
                (
                    [name] => CentOS-6.5-x86_64-bin-DVD1.iso
                    [filename] => CentOS-6.5-x86_64-bin-DVD1.iso
                    [size] => 4467982336
                    [distro] => centos
                )


               .
               .
               .
               .


            [ubuntu-12.04.2-server-amd64.iso] => Array
                (
                    [name] => ubuntu-12.04.2-server-amd64.iso
                    [filename] => ubuntu-12.04.2-server-amd64.iso
                    [size] => 687865856
                    [distro] => ubuntu
                )

            [mikrotik-6.6.iso] => Array
                (
                    [name] => mikrotik-6.6.iso
                    [filename] => mikrotik-6.6.iso
                    [size] => 20328448
                    [distro] => others
                )

        )

    [mgs] => Array
        (
            [1] => Array
                (
                    [mgid] => 1
                    [mg_name] => test
                    [mg_desc] => test
                    [mg_type] => kvm
                )

        )

    [timenow] => 1403174437
    [time_taken] => 0.018
)