List VPS

Use the List VPS API to list all the Virtual Private Servers present on your Server.

HTTP Request

https://hostname:4083/index.php?act=listvs

Parameters

NameTypeValueDescriptionRequired
actGETlistvsThe action which will return data belonging to a particular pageYes

Sample Code

PHP

<?php
    require_once('/usr/local/virtualizor/sdk/enduser.php');
    $host_ip  = 'xxx.xxx.xxx.xxx';
    $key      = 'A3TNS71Z4OWXXXXX';
    $key_pass = 'ifxzfx52cigahzzwn3avhoskxxxxxxxx';

    $v = new Virtualizor_Enduser_API($host_ip, $key, $key_pass);

    $vps_list = $v->listvs();

    print_r($vps_list);
?>

Curl

curl -k -L "https://hostname:4083/index.php?act=listvs
&api=json&apikey=your_api_key
&apipass=your_api_pass"

Output

{
    "3332": {
        "vpsid": "3332",
        "vps_name": "v1983",
        "uuid": "xpkbf3m6uzkcdqfr",
        "serid": "0",
        "time": "1469661435",
        "edittime": "1469760539",
        "virt": "kvm",
        "uid": "299",
        "plid": "2",
        "hostname": "vps_hostname",
        "osid": "347",
        "os_name": "centos-6.6-x86_64",
        "iso": "",
        "sec_iso": "",
        "boot": "cda",
        "space": "7",
        "inodes": "0",
        "ram": "2048",
        "burst": "0",
        "swap": "4096",
        "cpu": "1024",
        "cores": "4",
        "cpupin": "-1",
        "cpu_percent": "0.00",
        "bandwidth": "1000",
        "network_speed": "1024",
        "upload_speed": "0",
        "io": "0",
        "ubc": "a:0:{}",
        "acpi": "1",
        "apic": "1",
        "pae": "1",
        "shadow": "0",
        "vnc": "1",
        "vncport": "6250",
        "vnc_passwd": "",
        "hvm": "0",
        "suspended": "0",
        "suspend_reason": null,
        "nw_suspended": null,
        "rescue": "0",
        "band_suspend": "0",
        "tuntap": "0",
        "ppp": "0",
        "ploop": "0",
        "dns_nameserver": "a:0:{}",
        "osreinstall_limit": "0",
        "preferences": null,
        "nic_type": "default",
        "vif_type": "",
        "virtio": "1",
        "pv_on_hvm": "0",
        "kvm_cache": "0",
        "io_mode": "0",
        "cpu_mode": "default",
        "total_iops_sec": "0",
        "read_bytes_sec": "0",
        "write_bytes_sec": "0",
        "kvm_vga": "0",
        "acceleration": "0",
        "vnc_keymap": "en-us",
        "routing": "0",
        "mg": "",
        "used_bandwidth": "0.03",
        "webuzo": "0",
        "disable_ebtables": "0",
        "admin_managed": "0",
        "rdp": "0",
        "email": "test@test.com",
        "server_name": "localhost",
        "os_distro": "centos",
        "distro": "centos_40.gif",
        "status": 0,
        "ips": {
            "s112": "xx.xx.xx.xx",
        }
    },
    "3384": {
        "vpsid": "3384",
        "vps_name": "v2000",
        "uuid": "4jpephqaejx0bolh",
        "serid": "0",
        "time": "1470694903",
        "edittime": "0",
        "virt": "kvm",
        "uid": "299",
        "plid": "0",
        "hostname": "Testvps_create",
        "osid": "334",
        "os_name": "centos-7.0-x86_64",
        "iso": "",
        "sec_iso": "",
        "boot": "cda",
        "space": "5",
        "inodes": "0",
        "ram": "1024",
        "burst": "0",
        "swap": "1024",
        "cpu": "1024",
        "cores": "4",
        "cpupin": "-1",
        "cpu_percent": "0.00",
        "bandwidth": "0",
        "network_speed": "0",
        "upload_speed": "-1",
        "io": "0",
        "ubc": "",
        "acpi": "1",
        "apic": "1",
        "pae": "1",
        "shadow": "0",
        "vnc": "1",
        "vncport": "6259",
        "vnc_passwd": "",
        "hvm": "0",
        "suspended": "0",
        "suspend_reason": null,
        "nw_suspended": null,
        "rescue": "0",
        "band_suspend": "0",
        "tuntap": "0",
        "ppp": "0",
        "ploop": "0",
        "dns_nameserver": "a:0:{}",
        "osreinstall_limit": "0",
        "preferences": null,
        "nic_type": "e1000",
        "vif_type": "",
        "virtio": "0",
        "pv_on_hvm": "0",
        "kvm_cache": "0",
        "io_mode": "0",
        "cpu_mode": "default",
        "total_iops_sec": "0",
        "read_bytes_sec": "0",
        "write_bytes_sec": "0",
        "kvm_vga": "0",
        "acceleration": "0",
        "vnc_keymap": "en-us",
        "routing": "0",
        "mg": "",
        "used_bandwidth": "0.00",
        "webuzo": "0",
        "disable_ebtables": "0",
        "admin_managed": "0",
        "rdp": "0",
        "email": "test@test.com",
        "server_name": "localhost",
        "os_distro": "centos",
        "distro": "centos_40.gif",
        "status": 0,
        "ips": {
            "s13": "xx.xx.xx.xx"
        }
    }
}
Was this helpful to you?