List VPS


This article provides a guide to list VPS using VPS Reseller API.

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

This function is for cloud user.

HTTP Request

https://vm1.apivps.com:4083/index.php?act=listvs

Parameters

Name Type Value Description Required
act GET listvs The action which will return data belonging to a particular page Yes

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://vm1.apivps.com: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"
        }
    }
}

Conclusion

You now know how to list VPS as a VPS Reseller.

  • vps api, api
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Add SSH Key

This article provides a guide for a VPS Reseller user to add SSH key via API. Use Add SSH key...

Cloud Resources

This article provides a guide for a VPS Reseller user to get cloud resources available to the...

Delete VM

This article provides a guide for a VPS Reseller user to delete VM via API. Use Delete VM API to...

Add ISO

This article provides a guide for a VPS Reseller user to add a new ISO to a VPS via API. Use Add...

List SSH Keys

This article provides a guide for a VPS Reseller user to list SSH keys via API. Use List SSH...