VPS Info

Use the VPS Info API to list specific Virtual Private Server present on your Server.

HTTP Request

https://hostname:4083/index.php?act=vpsmanage&svs=VPSID

Parameters

NameTypeValueDescriptionRequired
actGETvpsmanageThe action which will return data belonging to a particular pageYes
svsPOSTVPSIDProvide vpsid of which you want the information.Yes

Sample Code

PHP

<?php
    require_once('/usr/local/virtualizor/sdk/enduser.php');
    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'host_ip';

    $v = new Virtualizor_Enduser_API($ip, $key, $pass);
	
	$vid = 6710; //vpsid
    $vps = $v->vpsinfo($vid);
	
    print_r(json_encode($vps));
?>

Curl

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

Output

{
   "uid":"600",
   "act":"vpsmanage",
   "timezone":2,
   "timenow":"July 24, 2019, 12:24 pm",
   "vpsid":6710,
   "username":"a@a.com",
   "user_type":"2",
   "preferences":{
      "theme":"default",
      "language":"english",
      "timezone":2
   },
   "url":"index.php?",
   "rdns":{
      "pdnsid":null
   },
   "support_link":"http:\/\/softaculous.com",
   "enable_eu_iso":1,
   "billing_symbol":"$",
   "enable_registration":0,
   "inhouse_billing":"0",
   "title":"KVMTestServer",
   "info":{
      "os":{
         "osid":"626",
         "type":"kvm",
         "name":"centos-6.9-x86_64",
         "filename":"centos-6.9-x86_64.img",
         "size":"1291845632",
         "pygrub":"0",
         "drive":"",
         "hvm":"0",
         "perf_ops":"1",
         "active":"1",
         "url":"http:\/\/files.virtualizor.com\/ostemplates.php?osid=626",
         "distro":"centos",
         "Nvirt":"kvm",
         "distro_logo":"centos_60.gif"
      },
      "ip":[
         "xx.xx.xx.xx"
      ],
      "ip_count":1,
      "hostname":"test_openvz2",
      "status":1,
      "uptime":"",
      "bandwidth":{
         "limit":0,
         "used":803.57,
         "usage":{
            "20190717":516.77,
            "20190718":67.01,
            "20190719":35.49,
            "20190720":55.58,
            "20190721":35.59,
            "20190722":37.17,
            "20190723":35.56,
            "20190724":20.4,
            "20190725":0,
            "20190726":0,
            "20190727":0,
            "20190728":0,
            "20190729":0,
            "20190730":0,
            "20190731":0,
            "20190801":0,
            "20190802":0,
            "20190803":0,
            "20190804":0,
            "20190805":0,
            "20190806":0,
            "20190807":0,
            "20190808":0,
            "20190809":0,
            "20190810":0,
            "20190811":0,
            "20190812":0,
            "20190813":0,
            "20190814":0,
            "20190815":0,
            "20190816":0
         },
         "limit_gb":0,
         "used_gb":0.78,
         "in":{
            "20190717":507.14,
            "20190718":38.9,
            "20190719":20.41,
            "20190720":40.43,
            "20190721":20.5,
            "20190722":20.74,
            "20190723":20.52,
            "20190724":11.34,
            "20190725":0,
            "20190726":0,
            "20190727":0,
            "20190728":0,
            "20190729":0,
            "20190730":0,
            "20190731":0,
            "20190801":0,
            "20190802":0,
            "20190803":0,
            "20190804":0,
            "20190805":0,
            "20190806":0,
            "20190807":0,
            "20190808":0,
            "20190809":0,
            "20190810":0,
            "20190811":0,
            "20190812":0,
            "20190813":0,
            "20190814":0,
            "20190815":0,
            "20190816":0
         },
         "out":{
            "20190717":9.63,
            "20190718":28.11,
            "20190719":15.08,
            "20190720":15.15,
            "20190721":15.08,
            "20190722":16.44,
            "20190723":15.04,
            "20190724":9.06,
            "20190725":0,
            "20190726":0,
            "20190727":0,
            "20190728":0,
            "20190729":0,
            "20190730":0,
            "20190731":0,
            "20190801":0,
            "20190802":0,
            "20190803":0,
            "20190804":0,
            "20190805":0,
            "20190806":0,
            "20190807":0,
            "20190808":0,
            "20190809":0,
            "20190810":0,
            "20190811":0,
            "20190812":0,
            "20190813":0,
            "20190814":0,
            "20190815":0,
            "20190816":0
         },
         "yr_bandwidth":{
            "8":{
               "in":0,
               "out":0
            },
            "7":{
               "in":0,
               "out":0
            },
            "9":{
               "in":0,
               "out":0
            },
            "10":{
               "in":0,
               "out":0
            },
            "11":{
               "in":0,
               "out":0
            },
            "5":{
               "in":0,
               "out":0
            },
            "4":{
               "in":0,
               "out":0
            },
            "0":{
               "in":0,
               "out":0
            },
            "1":{
               "in":0,
               "out":0
            },
            "2":{
               "in":0,
               "out":0
            },
            "3":{
               "in":0,
               "out":0
            },
            "6":{
               "in":"679.97931194",
               "out":"123.58997917",
               "vpsid":"6710",
               "date":"201907"
            }
         },
         "free":0,
         "free_gb":0,
         "percent":0,
         "percent_free":100
      },
      "vps":{
         "vpsid":"6710",
         "vps_name":"v3351",
         "uuid":"phrvdyimgm1m9flc",
         "serid":"4",
         "time":"1563357483",
         "edittime":"1563424350",
         "virt":"kvm",
         "uid":"600",
         "plid":"0",
         "hostname":"test_openvz2",
         "osid":"626",
         "os_name":"centos-6.9-x86_64",
         "iso":"",
         "sec_iso":"",
         "boot":"cda",
         "space":"5",
         "inodes":"0",
         "ram":"1000",
         "burst":"0",
         "swap":"2048",
         "cpu":"1024",
         "cores":"2",
         "cpupin":"-1",
         "cpu_percent":"50.00",
         "bandwidth":"0",
         "network_speed":"0",
         "upload_speed":"-1",
         "io":"0",
         "ubc":"",
         "acpi":"1",
         "apic":"1",
         "pae":"1",
         "shadow":"0",
         "vnc":"1",
         "vncport":"5951",
         "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":"virtio",
         "vif_type":"",
         "virtio":"1",
         "pv_on_hvm":"0",
         "disks":[
            {
               "did":"1743",
               "disk_uuid":"dhq3msoctobguo3r",
               "st_uuid":"zqaqw0xubqawgb2r",
               "vps_uuid":"phrvdyimgm1m9flc",
               "path":"\/dev\/vg0\/vsv3351-dhq3msoctobguo3r-phrvdyimgm1m9flc",
               "primary":"1",
               "size":"5.000",
               "size_unit":"",
               "type":"block",
               "format":"raw",
               "num":"0",
               "rescue":"0",
               "extra":"",
               "bus_driver":"",
               "bus_driver_num":"0",
               "vpsid":6710
            }
         ],
         "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.78",
         "cached_disk":{
            "disk":{
               "Used":0,
               "Available":0,
               "Use%":0
            },
            "inode":{
               "Inodes":0,
               "IUsed":0,
               "IFree":0,
               "Use%":0
            }
         },
         "webuzo":"0",
         "disable_ebtables":"1",
         "install_xentools":"0",
         "admin_managed":"0",
         "rdp":"0",
         "topology_sockets":"0",
         "topology_cores":"0",
         "topology_threads":"0",
         "mac":"00:16:3e:cf:c7:62",
         "notes":null,
         "disable_nw_config":"0",
         "locked":"",
         "openvz_features":"",
         "speed_cap":"",
         "numa":"0",
         "bpid":"-1",
         "bserid":"0",
         "timezone":null,
         "ha":"0",
         "pid":"0"
      },
      "virt":"kvm",
      "vpsid":"6710",
      "serid":"4",
      "server_name":"hostname",
      "flags":{
         "disable_icons_cp":1,
         "disable_recipes":0,
         "disable_backup_cp":0,
         "disable_icons_monitor":0,
         "rescue_mode":1,
         "disable_change_hostname":0,
         "disable_change_password":0,
         "disable_vps_config":0,
         "disable_os_reinstall":0,
         "disable_ssh":0,
         "disable_self_shutdown":0,
         "disable_server_location":0,
         "enable_rdns":1,
         "haproxy":1,
         "services_support":0,
         "proc_support":0,
         "disable_enduser_sshkeys":0,
         "hvmsettings":1,
         "enable_console":0,
         "ipv6_subnets":0,
         "map_address":{
            "city":"Nuremberg",
            "state":"Bayern",
            "country_code":"DE",
            "latitude":"49.44078",
            "longitude":"11.06033"
         },
         "iso_support":1
      }
   },
   "time_taken":"2.352"
}
Was this helpful to you?