NAV
CURL PHP

Virtual Server

List VPS

Example: To list the vitural servers, use the code:


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

<?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);
?>

Result: The above code returns a JSON array.

{
    "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": "192.168.10.10",
            "s11": "192.168.10.41",
            "s14": "192.168.10.44",
            "s76184": "1112:2222:2222:1111:2222:2223:38be:99e5",
            "s76169": "1112:2222:2222:1111:2222:2223:4c89:d969"
        }
    },
    "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": "192.168.10.43"
        }
    }
}
{
    "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": "192.168.10.10",
            "s11": "192.168.10.41",
            "s14": "192.168.10.44",
            "s76184": "1112:2222:2222:1111:2222:2223:38be:99e5",
            "s76169": "1112:2222:2222:1111:2222:2223:4c89:d969"
        }
    },
    "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": "192.168.10.43"
        }
    }
}

HTTP Request

https://hostname: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

Create VM

curl -k -X POST -d "addvs=1&virt=kvm&rootpass=test123&hostname=test_api&
space=4&ram=1024&swap=1024&bandwidth=0&uid=372&cpu=1024&
cores=4&ips=1&vnc=1&osid=347"
-L "https://hostname:4083/index.php?act=create&
api=json&apikey=your_api_key&apipass=your_api_pass"
<?php
    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'host_ip';

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

    $post = array();
    $post['virt'] = 'kvm';
    $post['sgid'] = 0;
    $post['rootpass'] ='test123';   
    $post['hostname'] = 'testcloud' ;
    $post['space'] = 2 ;
    $post['ram'] = 1024;
    $post['swapram'] = 1024;
    $post['bandwidth'] = 0;
    $post['uid'] = 368;
    $post['cores'] = 2;
    $post['num_ipv4'] = 1;
    $post['vnc'] = 1;
    $post['vncpass'] = 'testvnc';
    $post['band_suspend'] = 1;
    $post['osreinstall_limit'] = 0;
    $post['osid'] = 272;
    $post['addvps'] = 1;

    $output = $admin->create($post);

    print_r(json_encode($output));
?>

Result: The above code produces the following output

{
    "uid": "372",
    "act": "create",
    "timezone": 1,
    "timenow": "October 2, 2016, 2:09 am",
    "vpsid": "3588",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Launch Instance",
    "resources": {
        "num_vs": 99999,
        "num_users": 15,
        "space": 46,
        "ram": 1024,
        "burst": 1024,
        "bandwidth": 1000000,
        "num_ipv4": 49,
        "num_ipv6_subnet": 0,
        "num_ipv6": "0",
        "cores": "8",
        "num_cores": 9996,
        "network_speed": "0",
        "upload_speed": "0",
        "allowed_virts": {
            "kvm": "kvm"
        },
        "cloud_allow_virtio": 1
    },
    "usage": {
        "num_cores": 4
    },
    "users": {
        "372": {
            "uid": "372",
            "email": "test@test.com"
        }
    },
    "ostemplates": {
        "272": {
            "osid": "272",
            "type": "kvm",
            "name": "centos-6.5-x86_64",
            "filename": "centos-6.5-x86_64.img",
            "size": "1074855936",
            "pygrub": "0",
            "drive": "",
            "hvm": "0",
            "perf_ops": "1",
            "active": "1",
            "url": "http://files.virtualizor.com/ostemplates.php?osid=272",
            "distro": "centos",
            "Nvirt": "kvm"
        },
        "334": {
            "osid": "334",
            "type": "kvm",
            "name": "centos-7.0-x86_64",
            "filename": "centos-7.0-x86_64.img",
            "size": "1291845632",
            "pygrub": "0",
            "drive": "",
            "hvm": "0",
            "perf_ops": "1",
            "active": "1",
            "url": "http://files.virtualizor.com/ostemplates.php?osid=334",
            "distro": "centos",
            "Nvirt": "kvm",
            "mg": [16]
        },
        "347": {
            "osid": "347",
            "type": "kvm",
            "name": "centos-6.6-x86_64",
            "filename": "centos-6.6-x86_64.img",
            "size": "1074855936",
            "pygrub": "0",
            "drive": "",
            "hvm": "0",
            "perf_ops": "1",
            "active": "1",
            "url": "http://files.virtualizor.com/ostemplates.php?osid=347",
            "distro": "centos",
            "Nvirt": "kvm"
        },
        "381": {
            "osid": "381",
            "type": "kvm",
            "name": "centos-7.1-x86_64",
            "filename": "centos-7.1-x86_64.img",
            "size": "1074855936",
            "pygrub": "0",
            "drive": "",
            "hvm": "0",
            "perf_ops": "1",
            "active": "1",
            "url": "http://files.virtualizor.com/ostemplates.php?osid=381",
            "distro": "centos",
            "Nvirt": "kvm"
        },
        "399": {
            "osid": "399",
            "type": "kvm",
            "name": "debian-8.0-x86_64",
            "filename": "debian-8.0-x86_64.img",
            "size": "1073741824",
            "pygrub": "0",
            "drive": "",
            "hvm": "0",
            "perf_ops": "1",
            "active": "1",
            "url": "http://files.virtualizor.com/ostemplates.php?osid=399",
            "distro": "debian",
            "Nvirt": "kvm"
        },
    },
    "isos": {
        "debian-8.0.0-amd64-netinst.iso": {
            "iso": "debian-8.0.0-amd64-netinst.iso",
            "mg": [17],
            "name": "debian-8.0.0-amd64-netinst.iso",
            "filename": "debian-8.0.0-amd64-netinst.iso",
            "size": 257949696,
            "distro": "debian"
        },
        "latest-virtio-win.iso": {
            "iso": "latest-virtio-win.iso",
            "mg": "",
            "name": "latest-virtio-win.iso",
            "filename": "latest-virtio-win.iso",
            "size": 56606720,
            "distro": "test"
        },
    },
    "servergroups": [{
        "sgid": 0,
        "sg_name": "test",
        "sg_reseller_name": "region",
        "sg_desc": "This is just desc",
        "sg_select": 0,
        "virts": {
            "kvm": "kvm",
            "openvz": "openvz"
        }
    }],
    "done": {
        "done": "3589",
        "msg": "The Virtual Server has been created",
        "goto": "act=listvs"
    },
    "done_msg": "The Virtual Server has been created",
    "newvs": {
        "type": "kvm",
        "sgid": 0,
        "rootpass": "test123",
        "hostname": "test_api",
        "space": 4,
        "ram": 1024,
        "burst": 0,
        "swapram": 1024,
        "bandwidth": 0,
        "uid": 372,
        "cores": 4,
        "num_ipv4": 1,
        "num_ipv6": 0,
        "num_ipv6_subnet": 0,
        "vnc": 1,
        "vncpass": "kt6lormd",
        "shadow": 0,
        "iso": "",
        "boot": "cda",
        "band_suspend": 1,
        "tuntap": 0,
        "osreinstall_limit": 0,
        "mg": "",
        "osid": 347,
        "virtio": 0,
        "node_select": 1,
        "server_group": 0,
        "num_ips": 1,
        "num_ips6": 0,
        "num_ips6_subnet": 0,
        "addvps": 1,
        "vpsid": "3589",
        "ips": ["10.10.100.6"],
        "ips6": [],
        "ipv6_subnet": []
    },
    "res_limit": {
        "num_vs": "100000",
        "num_users": "15",
        "space": "50",
        "ram": "2048",
        "bandwidth": "1000000",
        "num_ipv4": "50",
        "num_ipv6_subnet": "0",
        "num_ipv6": "0",
        "num_cores": "10000",
        "cores": "8"
    },
    "virts": {
        "openvz": "openvz",
        "xen": "xen",
        "xenhvm": "xenhvm",
        "kvm": "kvm",
        "xcp": "xcp",
        "xcphvm": "xcphvm",
        "lxc": "lxc"
    },
    "virt_lang": {
        "openvz": "OpenVZ",
        "xen": "Xen",
        "xenhvm": "Xen HVM",
        "kvm": "KVM",
        "xcp": "XCP",
        "xcphvm": "XCP HVM",
        "lxc": "LXC"
    },
    "time_taken": "3.119"
}

HTTP Request

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

Parameters

Parameters Type Value Description
act GET create The action will create vps instance for a particular user
virt POST virt The virtualization to be specified relevent to which the vps will be created.
sgid POST Int The server group where the vps will created and assigned.
rootpass POST rootpass The root password that will be set for the vps
hostname POST hostname Hostname for the vps will be set
space POST Int This will set the disk space for the vps. Also it will assign the disk space comparing with the space the individual user has declared
ram POST Int This will set the RAM for the vps. Also it will assign the RAM comparing with the RAM the individual user has declared
burst POST Int This is similar to swap ram and will use the disk space to create swap.(For OpenVZ)
swapram POST Int This will use the disk space to create swap.(FOR KVM, Xen, XenServer)
bandwidth POST Int This will assign the bandwidth to the vps and will also check available bandwidth that is assigned to the user
uid POST Int The user id under whom the vps will be created
cpu POST Int The cpu weight that has been assigned to the user
cpu_percent Int The cpu share in % that will be assigned to the vps.
cores POST Int Number of CPU cores that will be used by the vps.Assigned at the time of creation.
num_ipv4 POST Int Number of ipv4 addresses that will be assigned to the vps
num_ipv6 POST Int Numnber of ipv6 addresses that will be assigned to the vps
num_ipv6_subnet POST Int Number of ipv6 subnet that will be assigned to the vps
vnc POST 1/0 IF set then vnc will be set for the vps.
vncpass POST vncpass VNC password will be set automatically
shadow POST Int Used for Xen HVM. This sets the shadow memory for the vps.
iso POST iso Create vps using iso present on the server
boot POST boot Sets the boot order in the vps
tuntap POST Int If set then tuntap will be enabled.(For OpenVZ)
io POST Int If set then io priority for the vps will be enabled.(For OpenVZ)
band_suspend POST 1/0 If set then vps will be suspended if the bandwidth limit is exceeded.
osreinstall_limit POST Int This sets the value for limit for OS reinstallation.
osid POST Int This will assign the osid to the vps for installing OS template.
mg POST mg IF this is set then the OS template belonging to the media group will be displayed
addvps POST 1 IF set then the vps will be created.

Edit VM

curl -k -X POST -d "editvm=1&uid=372&hostname=testmic_23&ram=1024
&swap=1024&cores=4&space=42&bandwidth=1&vnc=1&ips=1" -L 
"https://hostname:4083/index.php?act=editvm&vid=3588&api=json&
apikey=you_api_key&apipass=your_api_pass&do=1"


<?php
    require_once('enduser.php');

    $key =  '';
    $pass = '';
    $ip = '';
    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);
    $post = array();
    $post['editvm'] = 1;
    $post['uid'] = 299;
    $post['hostname'] = 'test-adpi-edit';
    $post['space'] = 7 ;
    $post['ram'] = 2048;
    $post['bandwidth'] = 0;
    $post['cores'] = 4;
    $post['rootpass'] = 'test@123';
    $post['swapram'] = 1024;
    $post['vnc'] = 1;
    $post['ips'] = 3;

    $vid = 3511;

    $output = $admin->editvm($vid, $post);
    print_r(json_encode($output));
?>

Result:The above code will produce the following output

{
    "uid": "326",
    "act": "editvm",
    "timezone": 1,
    "timenow": "September 26, 2016, 7:47 am",
    "vpsid": "3260",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "",
        "lname": "",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Edit VPs",
    "resources": {
        "num_vs": 27,
        "num_users": 20,
        "space": 907,
        "ram": 93656,
        "burst": 10000,
        "bandwidth": 49991.81,
        "num_ipv4": 997,
        "num_ipv6_subnet": 10000,
        "num_ipv6": "10000",
        "cores": "4",
        "num_cores": 9988,
        "network_speed": "0",
        "upload_speed": "0",
        "allowed_virts": {
            "openvz": "openvz",
            "kvm": "kvm"
        },
        "cloud_allow_virtio": 1
    },
    "usage": {
        "num_cores": 12
    },
    "users": {
        "326": {
            "uid": "326",
            "email": "test@test.com"
        }
    },
    "ostemplates": {
        "272": {
            "osid": "272",
            "type": "kvm",
            "name": "centos-6.5-x86_64",
            "filename": "centos-6.5-x86_64.img",
            "size": "1074855936",
            "pygrub": "0",
            "drive": "",
            "hvm": "0",
            "perf_ops": "1",
            "active": "1",
            "url": "http://files.virtualizor.com/ostemplates.php?osid=272",
            "distro": "centos",
            "Nvirt": "kvm"
        },
        "334": {
            "osid": "334",
            "type": "kvm",
            "name": "centos-7.0-x86_64",
            "filename": "centos-7.0-x86_64.img",
            "size": "1291845632",
            "pygrub": "0",
            "drive": "",
            "hvm": "0",
            "perf_ops": "1",
            "active": "1",
            "url": "http://files.virtualizor.com/ostemplates.php?osid=334",
            "distro": "centos",
            "Nvirt": "kvm",
            "mg": [16]
        },
        "347": {
            "osid": "347",
            "type": "kvm",
            "name": "centos-6.6-x86_64",
            "filename": "centos-6.6-x86_64.img",
            "size": "1074855936",
            "pygrub": "0",
            "drive": "",
            "hvm": "0",
            "perf_ops": "1",
            "active": "1",
            "url": "http://files.virtualizor.com/ostemplates.php?osid=347",
            "distro": "centos",
            "Nvirt": "kvm"
        },
        "381": {
            "osid": "381",
            "type": "kvm",
            "name": "centos-7.1-x86_64",
            "filename": "centos-7.1-x86_64.img",
            "size": "1074855936",
            "pygrub": "0",
            "drive": "",
            "hvm": "0",
            "perf_ops": "1",
            "active": "1",
            "url": "http://files.virtualizor.com/ostemplates.php?osid=381",
            "distro": "centos",
            "Nvirt": "kvm"
        },
    },
    "done": {
        "msg": "The Virtual Server has been sucessfully edited",
        "goto": "act=listvs"
    },
    "done_msg": "The Virtual Server has been sucessfully edited",
    "res_limit": {
        "num_vs": "30",
        "num_users": "20",
        "space": "1000",
        "ram": "100000",
        "bandwidth": "50000",
        "num_ipv4": "1000",
        "num_ipv6_subnet": "10000",
        "num_ipv6": "10000",
        "num_cores": "10000",
        "cores": "4"
    },
    "vps": {
        "vpsid": "3579",
        "vps_name": "v2104",
        "uuid": "6bhdgofgqflyqhbm",
        "serid": "1",
        "time": "0",
        "edittime": "1474872192",
        "virt": "kvm",
        "uid": "326",
        "plid": "0",
        "hostname": "testmic123",
        "osid": "334",
        "os_name": "centos-7.0-x86_64",
        "iso": "",
        "sec_iso": "",
        "boot": "cda",
        "space": "40",
        "inodes": "0",
        "ram": "2048",
        "burst": "0",
        "swap": "0",
        "cpu": "1024",
        "cores": "4",
        "cpupin": "-1",
        "cpu_percent": "0.00",
        "bandwidth": "1",
        "network_speed": "1024",
        "upload_speed": "0",
        "io": "0",
        "ubc": false,
        "acpi": "1",
        "apic": "1",
        "pae": "1",
        "shadow": "0",
        "vnc": "1",
        "vncport": "5945",
        "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": "",
        "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",
        "topology_sockets": "0",
        "topology_cores": "0",
        "topology_threads": "0",
        "mac": "",
        "notes": "",
        "disable_nw_config": "1",
        "pid": "0",
        "ips": {
            "76463": "10.10.100.10"
        },
        "distro": "centos"
    },
    "time_taken": "4.842"
}
{
    "uid": "326",
    "act": "editvm",
    "timezone": 1,
    "timenow": "September 26, 2016, 7:47 am",
    "vpsid": "3260",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "",
        "lname": "",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Edit VPs",
    "resources": {
        "num_vs": 27,
        "num_users": 20,
        "space": 907,
        "ram": 93656,
        "burst": 10000,
        "bandwidth": 49991.81,
        "num_ipv4": 997,
        "num_ipv6_subnet": 10000,
        "num_ipv6": "10000",
        "cores": "4",
        "num_cores": 9988,
        "network_speed": "0",
        "upload_speed": "0",
        "allowed_virts": {
            "openvz": "openvz",
            "kvm": "kvm"
        },
        "cloud_allow_virtio": 1
    },
    "usage": {
        "num_cores": 12
    },
    "users": {
        "326": {
            "uid": "326",
            "email": "test@test.com"
        }
    },
    "ostemplates": {
        "272": {
            "osid": "272",
            "type": "kvm",
            "name": "centos-6.5-x86_64",
            "filename": "centos-6.5-x86_64.img",
            "size": "1074855936",
            "pygrub": "0",
            "drive": "",
            "hvm": "0",
            "perf_ops": "1",
            "active": "1",
            "url": "http://files.virtualizor.com/ostemplates.php?osid=272",
            "distro": "centos",
            "Nvirt": "kvm"
        },
        "334": {
            "osid": "334",
            "type": "kvm",
            "name": "centos-7.0-x86_64",
            "filename": "centos-7.0-x86_64.img",
            "size": "1291845632",
            "pygrub": "0",
            "drive": "",
            "hvm": "0",
            "perf_ops": "1",
            "active": "1",
            "url": "http://files.virtualizor.com/ostemplates.php?osid=334",
            "distro": "centos",
            "Nvirt": "kvm",
            "mg": [16]
        },
        "347": {
            "osid": "347",
            "type": "kvm",
            "name": "centos-6.6-x86_64",
            "filename": "centos-6.6-x86_64.img",
            "size": "1074855936",
            "pygrub": "0",
            "drive": "",
            "hvm": "0",
            "perf_ops": "1",
            "active": "1",
            "url": "http://files.virtualizor.com/ostemplates.php?osid=347",
            "distro": "centos",
            "Nvirt": "kvm"
        },
        "381": {
            "osid": "381",
            "type": "kvm",
            "name": "centos-7.1-x86_64",
            "filename": "centos-7.1-x86_64.img",
            "size": "1074855936",
            "pygrub": "0",
            "drive": "",
            "hvm": "0",
            "perf_ops": "1",
            "active": "1",
            "url": "http://files.virtualizor.com/ostemplates.php?osid=381",
            "distro": "centos",
            "Nvirt": "kvm"
        },
    },
    "done": {
        "msg": "The Virtual Server has been sucessfully edited",
        "goto": "act=listvs"
    },
    "done_msg": "The Virtual Server has been sucessfully edited",
    "res_limit": {
        "num_vs": "30",
        "num_users": "20",
        "space": "1000",
        "ram": "100000",
        "bandwidth": "50000",
        "num_ipv4": "1000",
        "num_ipv6_subnet": "10000",
        "num_ipv6": "10000",
        "num_cores": "10000",
        "cores": "4"
    },
    "vps": {
        "vpsid": "3579",
        "vps_name": "v2104",
        "uuid": "6bhdgofgqflyqhbm",
        "serid": "1",
        "time": "0",
        "edittime": "1474872192",
        "virt": "kvm",
        "uid": "326",
        "plid": "0",
        "hostname": "testmic123",
        "osid": "334",
        "os_name": "centos-7.0-x86_64",
        "iso": "",
        "sec_iso": "",
        "boot": "cda",
        "space": "40",
        "inodes": "0",
        "ram": "2048",
        "burst": "0",
        "swap": "0",
        "cpu": "1024",
        "cores": "4",
        "cpupin": "-1",
        "cpu_percent": "0.00",
        "bandwidth": "1",
        "network_speed": "1024",
        "upload_speed": "0",
        "io": "0",
        "ubc": false,
        "acpi": "1",
        "apic": "1",
        "pae": "1",
        "shadow": "0",
        "vnc": "1",
        "vncport": "5945",
        "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": "",
        "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",
        "topology_sockets": "0",
        "topology_cores": "0",
        "topology_threads": "0",
        "mac": "",
        "notes": "",
        "disable_nw_config": "1",
        "pid": "0",
        "ips": {
            "76463": "10.10.100.10"
        },
        "distro": "centos"
    },
    "time_taken": "4.842"
}

HTTP Request

https://hostname:4083/index.php?act=editvm&vid=vpsid

Parameters

Name Type Value Description Required
act GET editvm Retrieves information regarding a particular page Yes
vid GET Int Retrieves all information regarding the particular vps. This will be passed in the URL Yes
vid POST Int The vpsid that needs to be edited. This will be specified as a POST Paramter during call Yes
editvm POST 1 IF set then the vm will edited Yes
uid POST Int The user whose vps needs to be edited Yes
hostname POST hostname This sets the hostname of the vps Yes
space POST space This gives the disk size to the vps Yes
ram POST ram This sets the RAM of the vps Yes
bandwidth POST bandwidth This sets the bandwidth for the vps Yes
burst POST burst This will let user edit the burst ram. (For OpenVZ) Yes
cores POST cores This sets the CPU cores Yes
rootpass POST rootpass Sets the root password of the vps No
swapram POST swapram Swap RAM is set Yes
vnc POST 1/0 This enables VNC for accessing the vps Yes
ips POST ips This sets number of ips for the vps Yes

Delete VM

curl -k -X GET -L "https://hostname:4083/index.php?act=listvs&
delvs=3588&api=json&apikey=your_api_pass&
apipass=your_api_pass"
<?php

    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'your_server_ip';

    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);
    $del_vpsid = 3589;
    $output = $admin->listvs($del_vpsid);

    print_r(json_encode($output));
?>

Result:The above code will produce the following output

{
    "uid": "372",
    "act": "listvs",
    "timezone": 1,
    "timenow": "October 7, 2016, 5:21 am",
    "vpsid": "3605",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "Virtual Servers",
    "vs": {
        "3588": {
            "vpsid": "3588",
            "vps_name": "v2107",
            "uuid": "w39wbbcohi8rwz2p",
            "serid": "0",
            "time": "1475370479",
            "edittime": "1475799626",
            "virt": "kvm",
            "uid": "372",
            "plid": "0",
            "hostname": "testmic_23",
            "osid": "347",
            "os_name": "centos-6.6-x86_64",
            "iso": "",
            "sec_iso": "",
            "boot": "cda",
            "space": "42",
            "inodes": "0",
            "ram": "1024",
            "burst": "0",
            "swap": "1024",
            "cpu": "1024",
            "cores": "4",
            "cpupin": "-1",
            "cpu_percent": "200.00",
            "bandwidth": "1",
            "network_speed": "0",
            "upload_speed": "-1",
            "io": "0",
            "ubc": "",
            "acpi": "1",
            "apic": "1",
            "pae": "1",
            "shadow": "0",
            "vnc": "1",
            "vncport": "6285",
            "vnc_passwd": "",
            "hvm": "0",
            "suspended": "0",
            "suspend_reason": null,
            "nw_suspended": null,
            "rescue": "0",
            "band_suspend": "1",
            "tuntap": "0",
            "ppp": "0",
            "ploop": "0",
            "dns_nameserver": "a:0:{}",
            "osreinstall_limit": "0",
            "preferences": null,
            "nic_type": "default",
            "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.02",
            "webuzo": "0",
            "disable_ebtables": "0",
            "admin_managed": "0",
            "rdp": "0",
            "topology_sockets": "0",
            "topology_cores": "0",
            "topology_threads": "0",
            "mac": "",
            "notes": null,
            "disable_nw_config": "0",
            "email": "test@test.com",
            "server_name": "localhost",
            "os_distro": "centos",
            "distro": "centos_40.gif",
            "status": 1,
            "ips": {
                "s143228": "1.1.1.3"
            }
        },
        "3605": {
            "vpsid": "3605",
            "vps_name": "v2117",
            "uuid": "3b2dhqrq9cjilhbq",
            "serid": "0",
            "time": "1475812986",
            "edittime": "0",
            "virt": "kvm",
            "uid": "372",
            "plid": "0",
            "hostname": "test_userapi",
            "osid": "347",
            "os_name": "centos-6.6-x86_64",
            "iso": "",
            "sec_iso": "",
            "boot": "cda",
            "space": "5",
            "inodes": "0",
            "ram": "1024",
            "burst": "0",
            "swap": "1024",
            "cpu": "1024",
            "cores": "8",
            "cpupin": "-1",
            "cpu_percent": "400.00",
            "bandwidth": "0",
            "network_speed": "0",
            "upload_speed": "-1",
            "io": "0",
            "ubc": "",
            "acpi": "1",
            "apic": "1",
            "pae": "1",
            "shadow": "0",
            "vnc": "1",
            "vncport": "6288",
            "vnc_passwd": "",
            "hvm": "0",
            "suspended": "0",
            "suspend_reason": null,
            "nw_suspended": null,
            "rescue": "0",
            "band_suspend": "1",
            "tuntap": "0",
            "ppp": "0",
            "ploop": "0",
            "dns_nameserver": "a:0:{}",
            "osreinstall_limit": "0",
            "preferences": null,
            "nic_type": "",
            "vif_type": "",
            "virtio": "0",
            "pv_on_hvm": "0",
            "kvm_cache": "",
            "io_mode": "",
            "cpu_mode": "",
            "total_iops_sec": "0",
            "read_bytes_sec": "0",
            "write_bytes_sec": "0",
            "kvm_vga": "0",
            "acceleration": "0",
            "vnc_keymap": "",
            "routing": "0",
            "mg": "",
            "used_bandwidth": "0.00",
            "webuzo": "0",
            "disable_ebtables": "0",
            "admin_managed": "0",
            "rdp": "0",
            "topology_sockets": "0",
            "topology_cores": "0",
            "topology_threads": "0",
            "mac": "",
            "notes": null,
            "disable_nw_config": "0",
            "email": "test@test.com",
            "server_name": "localhost",
            "os_distro": "centos",
            "distro": "centos_40.gif",
            "status": 1,
            "ips": {
                "s76463": "10.10.100.10"
            }
        }
    },
    "info": {
        "flags": {
            "enable_idsort": 1,
            "show_server": 0,
            "novnc": 1,
            "disable_java_vnc": 0
        }
    },
    "done": {
        "msg": "The VPS delete process has been initiated",
        "goto": "act=listvs",
        "vpsid": null
    },
    "delvs": {
        "done": true,
        "done_msg": "The VPS delete process has been initiated"
    },
    "time_taken": "0.488"
}

HTTP Request

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

Parameters

Name Type Value Description Required
act GET listvs Retrieves the list of vps created Yes
delvs POST vpsid The vpsid that needs to be deleted Yes

Start VM

curl -k  -L "https://hostname:4083/index.php?
svs=3560&act=start&api=json
&apikey=your_api_key&apipass=your_api_pass&do=1"
<?php
    require_once('enduser.php');

    $key =  '';
    $pass = '';
    $ip = '';
    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);

    $vid = 3332;

    $output = $admin->start($vid);
    print_r(json_encode($output));
?>

Result : The above code produces the following output

{
    "uid": "321",
    "act": "start",
    "timezone": 1,
    "timenow": "September 20, 2016, 6:41 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Start VPS",
    "done": {
        "msg": "The VPS was started successfully"
    },
    "status": 1,
    "output": false,
    "time_taken": "2.211"
}
{
    "uid": "321",
    "act": "start",
    "timezone": 1,
    "timenow": "September 20, 2016, 6:41 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Start VPS",
    "done": {
        "msg": "The VPS was started successfully"
    },
    "status": 1,
    "output": false,
    "time_taken": "2.211"
}

HTTP Request

https://hostname:4083/index.php?act=start&svs=vpsid&do=1

Parameters

Name Type Value Description Required
act GET start The action carried out to get data Yes
do GET 1 If set this will allow to carry out the operation Yes
svs POST Int The vps id which needs to be started.This will be passed to the url Yes

Stop VM

curl -k  -L "https://hostname:4083/index.php?
svs=3560&act=stop&api=json
&apikey=your_api_key&apipass=your_api_pass&do=1"
<?php
    require_once('enduser.php');

    $key =  '';
    $pass = '';
    $ip = '';
    $admin = new Virtualizor_Enduser_API($ip, $key, $pass); 
    $vid = 3332;

    $output = $admin->stop($vid);
    print_r(json_encode($output));
?>

Result:The above code will produce the following output

{
    "uid": "321",
    "act": "stop",
    "timezone": 1,
    "timenow": "September 20, 2016, 6:50 am",
    "vpsid": 3560,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Stop VPS",
    "done": {
        "msg": "The Shutdown signal has been sent to the VPS"
    },
    "status": 0,
    "output": "",
    "time_taken": "0.590"
}
{
    "uid": "321",
    "act": "stop",
    "timezone": 1,
    "timenow": "September 20, 2016, 6:50 am",
    "vpsid": 3560,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Stop VPS",
    "done": {
        "msg": "The Shutdown signal has been sent to the VPS"
    },
    "status": 0,
    "output": "",
    "time_taken": "0.590"
}

HTTP Request

https://hostname:4083/index.php?act=stop&svs=vpsid&do=1

Parameters

Name Type Value Description Required
act GET stop The action used to carry out certain operation Yes
do GET 1 IF set then the particular action will be carried out Yes
svs POST Int The id of the vps is passed in order to stop the vps Yes

Restart VPS

curl -k  -L "https://hostname:4083/index.php?
svs=3560&act=restart&api=json
&apikey=your_api_key&apipass=your_api_pass&do=1"
<?php
    require_once('enduser.php');

    $key =  '';
    $pass = '';
    $ip = '';
    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);

    $vid = 3332;

    $output = $admin->restart($vid);
    print_r(json_encode($output));
?>  

Result: The above code produces the following output

{
    "uid": "321",
    "act": "restart",
    "timezone": 1,
    "timenow": "September 20, 2016, 6:52 am",
    "vpsid": 3560,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Restart VPS",
    "done": {
        "msg": "The VPS was restarted successfully"
    },
    "status": 0,
    "output": "Domain v2090 created from /etc/libvirt/qemu/v2090.xmln",
    "time_taken": "3.632"
}
{
    "uid": "321",
    "act": "restart",
    "timezone": 1,
    "timenow": "September 20, 2016, 6:52 am",
    "vpsid": 3560,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Restart VPS",
    "done": {
        "msg": "The VPS was restarted successfully"
    },
    "status": 0,
    "output": "Domain v2090 created from /etc/libvirt/qemu/v2090.xmln",
    "time_taken": "3.632"
}

HTTP Request

https://hostname:4083/index.php?act=restart&svs=vpsid&do=1

Parameters

Name Type Value Description Required
act GET restart The action carried out to perform certain operation Yes
do GET 1 IF set then the certain action will be carried out Yes
svs POST Int The vps id is passed as a parameter to be restarted Yes

Poweroff VPS

curl -k  -L "https://hostname:4083/index.php?
svs=3560&act=poweroff&api=json
&apikey=your_api_key&apipass=your_api_pass&do=1"
<?php
    require_once('enduser.php');

    $key =  '';
    $pass = '';
    $ip = '';
    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);

    $vid = 3332;

    $output = $admin->poweroff($vid);
    print_r(json_encode($output));
?>  

Result:The above code produces the following output

{
    "uid": "321",
    "act": "poweroff",
    "timezone": 1,
    "timenow": "September 20, 2016, 6:58 am",
    "vpsid": 3560,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Powereoff VPS",
    "error": ["The operation could not be completed"],
    "status": 0,
    "output": null,
    "time_taken": "0.411"
}
{
    "uid": "321",
    "act": "poweroff",
    "timezone": 1,
    "timenow": "September 20, 2016, 6:58 am",
    "vpsid": 3560,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Powereoff VPS",
    "error": ["The operation could not be completed"],
    "status": 0,
    "output": null,
    "time_taken": "0.411"
}

HTTP Parameters

https://hostname:4083/index.php?act=poweroff&do=1&svs=vpsid

Parameters

Name Type Value Description Required
act GET poweroff The action to be carried out on the vps Yes
do GET 1 If set this will allow the operation to be carried out Yes
svs POST Int The vps id to be powered off is passed as a parameter Yes

Suspend VPS

curl -k -X GET -L "https://hostname:4083/index.php?act=listvs&
suspend=3606&api=json&apikey=your_api_key&
apipass=your_api_pass"
<?php
    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'your_server_ip';

    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);
    $vpsid = 3608;
    $output = $admin->suspend($vpsid);
    print_r(json_encode($output));
?>

Result: The above code produces the following output

{
    "uid": "372",
    "act": "listvs",
    "timezone": 1,
    "timenow": "October 7, 2016, 5:52 am",
    "vpsid": "3591",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "Virtual Servers",
    "vs": {
        "3591": {
            "vpsid": "3591",
            "vps_name": "v2109",
            "uuid": "tj1jeuk9tdeubn2t",
            "serid": "0",
            "time": "1475544843",
            "edittime": "1475815482",
            "virt": "kvm",
            "uid": "372",
            "plid": "0",
            "hostname": "ApiByAmeya",
            "osid": "100081",
            "os_name": "create-template",
            "iso": "",
            "sec_iso": "",
            "boot": "cda",
            "space": "6",
            "inodes": "0",
            "ram": "1024",
            "burst": "0",
            "swap": "1024",
            "cpu": "1024",
            "cores": "4",
            "cpupin": "-1",
            "cpu_percent": "0.00",
            "bandwidth": "5",
            "network_speed": "0",
            "upload_speed": "-1",
            "io": "0",
            "ubc": "",
            "acpi": "1",
            "apic": "1",
            "pae": "1",
            "shadow": "0",
            "vnc": "1",
            "vncport": "6287",
            "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",
            "topology_sockets": "0",
            "topology_cores": "0",
            "topology_threads": "0",
            "mac": "",
            "notes": null,
            "disable_nw_config": "0",
            "email": "test@test.com",
            "server_name": "localhost",
            "os_distro": "others",
            "distro": "others_40.gif",
            "status": 1,
            "ips": {
                "s8": "192.168.2.110"
            }
        },
        "3606": {
            "vpsid": "3606",
            "vps_name": "v2117",
            "uuid": "zy4idtgmu8jexfjz",
            "serid": "0",
            "time": "1475815018",
            "edittime": "0",
            "virt": "kvm",
            "uid": "372",
            "plid": "0",
            "hostname": "test_userapi",
            "osid": "347",
            "os_name": "centos-6.6-x86_64",
            "iso": "",
            "sec_iso": "",
            "boot": "cda",
            "space": "30",
            "inodes": "0",
            "ram": "1024",
            "burst": "0",
            "swap": "1024",
            "cpu": "1024",
            "cores": "4",
            "cpupin": "-1",
            "cpu_percent": "200.00",
            "bandwidth": "0",
            "network_speed": "0",
            "upload_speed": "-1",
            "io": "0",
            "ubc": "",
            "acpi": "1",
            "apic": "1",
            "pae": "1",
            "shadow": "0",
            "vnc": "1",
            "vncport": "6288",
            "vnc_passwd": "",
            "hvm": "0",
            "suspended": "1",
            "suspend_reason": null,
            "nw_suspended": null,
            "rescue": "0",
            "band_suspend": "1",
            "tuntap": "0",
            "ppp": "0",
            "ploop": "0",
            "dns_nameserver": "a:0:{}",
            "osreinstall_limit": "0",
            "preferences": null,
            "nic_type": "",
            "vif_type": "",
            "virtio": "0",
            "pv_on_hvm": "0",
            "kvm_cache": "",
            "io_mode": "",
            "cpu_mode": "",
            "total_iops_sec": "0",
            "read_bytes_sec": "0",
            "write_bytes_sec": "0",
            "kvm_vga": "0",
            "acceleration": "0",
            "vnc_keymap": "",
            "routing": "0",
            "mg": "",
            "used_bandwidth": "0.00",
            "webuzo": "0",
            "disable_ebtables": "0",
            "admin_managed": "0",
            "rdp": "0",
            "topology_sockets": "0",
            "topology_cores": "0",
            "topology_threads": "0",
            "mac": "",
            "notes": null,
            "disable_nw_config": "0",
            "email": "test@test.com",
            "server_name": "localhost",
            "os_distro": "centos",
            "distro": "centos_40.gif",
            "status": 2,
            "ips": {
                "s143228": "1.1.1.3"
            }
        }
    },
    "info": {
        "flags": {
            "enable_idsort": 1,
            "show_server": 0,
            "novnc": 1,
            "disable_java_vnc": 0
        }
    },
    "done": {
        "msg": "The VPS has been suspended",
        "goto": "act=listvs",
        "vpsid": "3606"
    },
    "suspend": {
        "done": 1,
        "done_msg": "The VPS has been suspended"
    },
    "time_taken": "4.038"
}

HTTP Request

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

Parameters

Name Type Value Description Required
act GET listvs Retrieves the list of vps Yes
suspend POST vpsid The vpsid that needs to be suspended Yes

Unsuspend VPS

curl -k -X GET -L "https://hostname:4083/index.php?act=listvs&
unsuspend=3606&api=json&apikey=your_api_key&
apipass=your_api_pass"
<?  
    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'your_Server_ip';

    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);
    $vpsid = 3609;
    $output = $admin->unsuspend($vpsid);
    print_r(json_encode($output));
?>

Result:The above code produces the following output

{
    "uid": "372",
    "act": "listvs",
    "timezone": 1,
    "timenow": "October 7, 2016, 6:30 am",
    "vpsid": "3591",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "Virtual Servers",
    "vs": {
        "3591": {
            "vpsid": "3591",
            "vps_name": "v2109",
            "uuid": "tj1jeuk9tdeubn2t",
            "serid": "0",
            "time": "1475544843",
            "edittime": "1475815482",
            "virt": "kvm",
            "uid": "372",
            "plid": "0",
            "hostname": "ApiByAmeya",
            "osid": "100081",
            "os_name": "create-template",
            "iso": "",
            "sec_iso": "",
            "boot": "dca",
            "space": "6",
            "inodes": "0",
            "ram": "1024",
            "burst": "0",
            "swap": "1024",
            "cpu": "1024",
            "cores": "4",
            "cpupin": "-1",
            "cpu_percent": "0.00",
            "bandwidth": "5",
            "network_speed": "0",
            "upload_speed": "-1",
            "io": "0",
            "ubc": "",
            "acpi": "1",
            "apic": "1",
            "pae": "1",
            "shadow": "0",
            "vnc": "1",
            "vncport": "6287",
            "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": "1",
            "acceleration": "1",
            "vnc_keymap": "de-ch",
            "routing": "0",
            "mg": "",
            "used_bandwidth": "0.00",
            "webuzo": "0",
            "disable_ebtables": "0",
            "admin_managed": "0",
            "rdp": "0",
            "topology_sockets": "0",
            "topology_cores": "0",
            "topology_threads": "0",
            "mac": "",
            "notes": null,
            "disable_nw_config": "0",
            "email": "test@test.com",
            "server_name": "localhost",
            "os_distro": "others",
            "distro": "others_40.gif",
            "status": 1,
            "ips": {
                "s8": "192.168.2.110"
            }
        },
        "3609": {
            "vpsid": "3609",
            "vps_name": "v2117",
            "uuid": "bibk7btcce26eauw",
            "serid": "0",
            "time": "1475817999",
            "edittime": "0",
            "virt": "kvm",
            "uid": "372",
            "plid": "0",
            "hostname": "test_userapi",
            "osid": "347",
            "os_name": "centos-6.6-x86_64",
            "iso": "",
            "sec_iso": "",
            "boot": "cda",
            "space": "10",
            "inodes": "0",
            "ram": "1024",
            "burst": "0",
            "swap": "1024",
            "cpu": "1024",
            "cores": "4",
            "cpupin": "-1",
            "cpu_percent": "200.00",
            "bandwidth": "0",
            "network_speed": "0",
            "upload_speed": "-1",
            "io": "0",
            "ubc": "",
            "acpi": "1",
            "apic": "1",
            "pae": "1",
            "shadow": "0",
            "vnc": "1",
            "vncport": "6288",
            "vnc_passwd": "",
            "hvm": "0",
            "suspended": "0",
            "suspend_reason": null,
            "nw_suspended": null,
            "rescue": "0",
            "band_suspend": "1",
            "tuntap": "0",
            "ppp": "0",
            "ploop": "0",
            "dns_nameserver": "a:0:{}",
            "osreinstall_limit": "0",
            "preferences": null,
            "nic_type": "",
            "vif_type": "",
            "virtio": "0",
            "pv_on_hvm": "0",
            "kvm_cache": "",
            "io_mode": "",
            "cpu_mode": "",
            "total_iops_sec": "0",
            "read_bytes_sec": "0",
            "write_bytes_sec": "0",
            "kvm_vga": "0",
            "acceleration": "0",
            "vnc_keymap": "",
            "routing": "0",
            "mg": "",
            "used_bandwidth": "0.00",
            "webuzo": "0",
            "disable_ebtables": "0",
            "admin_managed": "0",
            "rdp": "0",
            "topology_sockets": "0",
            "topology_cores": "0",
            "topology_threads": "0",
            "mac": "",
            "notes": null,
            "disable_nw_config": "0",
            "email": "test@test.com",
            "server_name": "localhost",
            "os_distro": "centos",
            "distro": "centos_40.gif",
            "status": 1,
            "ips": {
                "s143228": "1.1.1.3"
            }
        }
    },
    "info": {
        "flags": {
            "enable_idsort": 1,
            "show_server": 0,
            "novnc": 1,
            "disable_java_vnc": 0
        }
    },
    "done": {
        "msg": "The VPS has been unsuspended",
        "goto": "act=listvs",
        "vpsid": "3609"
    },
    "unsuspend": {
        "done": 1,
        "done_msg": "The VPS has been unsuspended"
    },
    "time_taken": "1.575"
}
{
    "uid": "372",
    "act": "listvs",
    "timezone": 1,
    "timenow": "October 7, 2016, 6:30 am",
    "vpsid": "3591",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "Virtual Servers",
    "vs": {
        "3591": {
            "vpsid": "3591",
            "vps_name": "v2109",
            "uuid": "tj1jeuk9tdeubn2t",
            "serid": "0",
            "time": "1475544843",
            "edittime": "1475815482",
            "virt": "kvm",
            "uid": "372",
            "plid": "0",
            "hostname": "ApiByAmeya",
            "osid": "100081",
            "os_name": "create-template",
            "iso": "",
            "sec_iso": "",
            "boot": "dca",
            "space": "6",
            "inodes": "0",
            "ram": "1024",
            "burst": "0",
            "swap": "1024",
            "cpu": "1024",
            "cores": "4",
            "cpupin": "-1",
            "cpu_percent": "0.00",
            "bandwidth": "5",
            "network_speed": "0",
            "upload_speed": "-1",
            "io": "0",
            "ubc": "",
            "acpi": "1",
            "apic": "1",
            "pae": "1",
            "shadow": "0",
            "vnc": "1",
            "vncport": "6287",
            "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": "1",
            "acceleration": "1",
            "vnc_keymap": "de-ch",
            "routing": "0",
            "mg": "",
            "used_bandwidth": "0.00",
            "webuzo": "0",
            "disable_ebtables": "0",
            "admin_managed": "0",
            "rdp": "0",
            "topology_sockets": "0",
            "topology_cores": "0",
            "topology_threads": "0",
            "mac": "",
            "notes": null,
            "disable_nw_config": "0",
            "email": "test@test.com",
            "server_name": "localhost",
            "os_distro": "others",
            "distro": "others_40.gif",
            "status": 1,
            "ips": {
                "s8": "192.168.2.110"
            }
        },
        "3609": {
            "vpsid": "3609",
            "vps_name": "v2117",
            "uuid": "bibk7btcce26eauw",
            "serid": "0",
            "time": "1475817999",
            "edittime": "0",
            "virt": "kvm",
            "uid": "372",
            "plid": "0",
            "hostname": "test_userapi",
            "osid": "347",
            "os_name": "centos-6.6-x86_64",
            "iso": "",
            "sec_iso": "",
            "boot": "cda",
            "space": "10",
            "inodes": "0",
            "ram": "1024",
            "burst": "0",
            "swap": "1024",
            "cpu": "1024",
            "cores": "4",
            "cpupin": "-1",
            "cpu_percent": "200.00",
            "bandwidth": "0",
            "network_speed": "0",
            "upload_speed": "-1",
            "io": "0",
            "ubc": "",
            "acpi": "1",
            "apic": "1",
            "pae": "1",
            "shadow": "0",
            "vnc": "1",
            "vncport": "6288",
            "vnc_passwd": "",
            "hvm": "0",
            "suspended": "0",
            "suspend_reason": null,
            "nw_suspended": null,
            "rescue": "0",
            "band_suspend": "1",
            "tuntap": "0",
            "ppp": "0",
            "ploop": "0",
            "dns_nameserver": "a:0:{}",
            "osreinstall_limit": "0",
            "preferences": null,
            "nic_type": "",
            "vif_type": "",
            "virtio": "0",
            "pv_on_hvm": "0",
            "kvm_cache": "",
            "io_mode": "",
            "cpu_mode": "",
            "total_iops_sec": "0",
            "read_bytes_sec": "0",
            "write_bytes_sec": "0",
            "kvm_vga": "0",
            "acceleration": "0",
            "vnc_keymap": "",
            "routing": "0",
            "mg": "",
            "used_bandwidth": "0.00",  
            "webuzo": "0",
            "disable_ebtables": "0",
            "admin_managed": "0",
            "rdp": "0",
            "topology_sockets": "0",
            "topology_cores": "0",
            "topology_threads": "0",
            "mac": "",
            "notes": null,
            "disable_nw_config": "0",
            "email": "test@test.com",
            "server_name": "localhost",
            "os_distro": "centos",
            "distro": "centos_40.gif",
            "status": 1,
            "ips": {
                "s143228": "1.1.1.3"
            }
        }
    },
    "info": {
        "flags": {
            "enable_idsort": 1,
            "show_server": 0,
            "novnc": 1,
            "disable_java_vnc": 0
        }
    },
    "done": {
        "msg": "The VPS has been unsuspended",
        "goto": "act=listvs",
        "vpsid": "3609"
    },
    "unsuspend": {
        "done": 1,
        "done_msg": "The VPS has been unsuspended"
    },
    "time_taken": "1.575"
}

HTTP Request

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

Parameters

Name Type Value Description Required
act GET listvs The action retrieves list of vps Yes
suspend POST vpsid The vps id that needs to be unsuspended Yes

Network Suspend

curl -k -X GET -L "https://hostname:4083/index.php?act=listvs&
suspend_net=3609&api=json&apikey=your_api_key&
apipass=you_api_pass"
<?php   
    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'your_Server_ip';

    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);
    $vpsid = 3609;
    $output = $admin->suspend_net($vpsid);
    print_r(json_encode($output));
?>

Result: The above code produces the following output

{
    "uid": "372",
    "act": "listvs",
    "timezone": 1,
    "timenow": "October 7, 2016, 7:02 am",
    "vpsid": "3591",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "Virtual Servers",
    "vs": {
        "3591": {
            "vpsid": "3591",
            "vps_name": "v2109",
            "uuid": "tj1jeuk9tdeubn2t",
            "serid": "0",
            "time": "1475544843",
            "edittime": "1475815482",
            "virt": "kvm",
            "uid": "372",
            "plid": "0",
            "hostname": "ApiByAmeya",
            "osid": "100081",
            "os_name": "create-template",
            "iso": "",
            "sec_iso": "",
            "boot": "dca",
            "space": "6",
            "inodes": "0",
            "ram": "1024",
            "burst": "0",
            "swap": "1024",
            "cpu": "1024",
            "cores": "4",
            "cpupin": "-1",
            "cpu_percent": "0.00",
            "bandwidth": "5",
            "network_speed": "0",
            "upload_speed": "-1",
            "io": "0",
            "ubc": "",
            "acpi": "1",
            "apic": "1",
            "pae": "1",
            "shadow": "0",
            "vnc": "1",
            "vncport": "6287",
            "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": "1",
            "acceleration": "1",
            "vnc_keymap": "de-ch",
            "routing": "0",
            "mg": "",
            "used_bandwidth": "0.00",

            "webuzo": "0",
            "disable_ebtables": "0",
            "admin_managed": "0",
            "rdp": "0",
            "topology_sockets": "0",
            "topology_cores": "0",
            "topology_threads": "0",
            "mac": "",
            "notes": "null",
            "disable_nw_config": "0",
            "email": "test@test.com",
            "server_name": "localhost",
            "os_distro": "others",
            "distro": "others_40.gif",
            "status": 1,
            "ips": {
                "s8": "192.168.2.110"
            }
        },
        "3609": {
            "vpsid": "3609",
            "vps_name": "v2117",
            "uuid": "bibk7btcce26eauw",
            "serid": "0",
            "time": "1475817999",
            "edittime": "0",
            "virt": "kvm",
            "uid": "372",
            "plid": "0",
            "hostname": "test_userapi",
            "osid": "347",
            "os_name": "centos-6.6-x86_64",
            "iso": "",
            "sec_iso": "",
            "boot": "cda",
            "space": "10",
            "inodes": "0",
            "ram": "1024",
            "burst": "0",
            "swap": "1024",
            "cpu": "1024",
            "cores": "4",
            "cpupin": "-1",
            "cpu_percent": "200.00",
            "bandwidth": "0",
            "network_speed": "0",
            "upload_speed": "-1",
            "io": "0",
            "ubc": "",
            "acpi": "1",
            "apic": "1",
            "pae": "1",
            "shadow": "0",
            "vnc": "1",
            "vncport": "6288",
            "vnc_passwd": "",
            "hvm": "0",
            "suspended": "0",
            "suspend_reason": "null",
            "nw_suspended": "a:2:{s:2:"id";i:0;s:6:"reason";s:26:"Suspended network by Admin";}",
            "rescue": "0",
            "band_suspend": "1",
            "tuntap": "0",
            "ppp": "0",
            "ploop": "0",
            "dns_nameserver": "a:0:{}",
            "osreinstall_limit": "0",
            "preferences": "null",
            "nic_type": "",
            "vif_type": "",
            "virtio": "0",
            "pv_on_hvm": "0",
            "kvm_cache": "",
            "io_mode": "",
            "cpu_mode": "",
            "total_iops_sec": "0",
            "read_bytes_sec": "0",
            "write_bytes_sec": "0",
            "kvm_vga": "0",
            "acceleration": "0",
            "vnc_keymap": "",
            "routing": "0",
            "mg": "",
            "used_bandwidth": "0.00",
            "webuzo": "0",
            "disable_ebtables": "0",
            "admin_managed": "0",
            "rdp": "0",
            "topology_sockets": "0",
            "topology_cores": "0",
            "topology_threads": "0",
            "mac": "",
            "notes": null,
            "disable_nw_config": "0",
            "email": "test@test.com",
            "server_name": "localhost",
            "os_distro": "centos",
            "distro": "centos_40.gif",
            "status": 1,
            "ips": {
                "s143228": "1.1.1.3"
            }
        }
    },
    "info": {
        "flags": {
            "enable_idsort": 1,
            "show_server": 0,
            "novnc": 1,
            "disable_java_vnc": 0
        }
    },
    "done": {
        "msg": "The VPS network has been suspended",
        "goto": "act=listvs",
        "vpsid": "3609"
    },
    "suspend_net": {
        "done": 1
    },
    "time_taken": "0.524"
}
{
    "uid": "372",
    "act": "listvs",
    "timezone": 1,
    "timenow": "October 7, 2016, 7:02 am",
    "vpsid": "3591",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "Virtual Servers",
    "vs": {
        "3591": {
            "vpsid": "3591",
            "vps_name": "v2109",
            "uuid": "tj1jeuk9tdeubn2t",
            "serid": "0",
            "time": "1475544843",
            "edittime": "1475815482",
            "virt": "kvm",
            "uid": "372",
            "plid": "0",
            "hostname": "ApiByAmeya",
            "osid": "100081",
            "os_name": "create-template",
            "iso": "",
            "sec_iso": "",
            "boot": "dca",
            "space": "6",
            "inodes": "0",
            "ram": "1024",
            "burst": "0",
            "swap": "1024",
            "cpu": "1024",
            "cores": "4",
            "cpupin": "-1",
            "cpu_percent": "0.00",
            "bandwidth": "5",
            "network_speed": "0",
            "upload_speed": "-1",
            "io": "0",
            "ubc": "",
            "acpi": "1",
            "apic": "1",
            "pae": "1",
            "shadow": "0",
            "vnc": "1",
            "vncport": "6287",
            "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": "1",
            "acceleration": "1",
            "vnc_keymap": "de-ch",
            "routing": "0",
            "mg": "",
            "used_bandwidth": "0.00",
            "webuzo": "0",
            "disable_ebtables": "0",
            "admin_managed": "0",
            "rdp": "0",
            "topology_sockets": "0",
            "topology_cores": "0",
            "topology_threads": "0",
            "mac": "",
            "notes": null,
            "disable_nw_config": "0",
            "email": "test@test.com",
            "server_name": "localhost",
            "os_distro": "others",
            "distro": "others_40.gif",
            "status": 1,
            "ips": {
                "s8": "192.168.2.110"
            }
        },
        "3609": {
            "vpsid": "3609",
            "vps_name": "v2117",
            "uuid": "bibk7btcce26eauw",
            "serid": "0",
            "time": "1475817999",
            "edittime": "0",
            "virt": "kvm",
            "uid": "372",
            "plid": "0",
            "hostname": "test_userapi",
            "osid": "347",
            "os_name": "centos-6.6-x86_64",
            "iso": "",
            "sec_iso": "",
            "boot": "cda",
            "space": "10",
            "inodes": "0",
            "ram": "1024",
            "burst": "0",
            "swap": "1024",
            "cpu": "1024",
            "cores": "4",
            "cpupin": "-1",
            "cpu_percent": "200.00",
            "bandwidth": "0",
            "network_speed": "0",
            "upload_speed": "-1",
            "io": "0",
            "ubc": "",
            "acpi": "1",
            "apic": "1",
            "pae": "1",
            "shadow": "0",
            "vnc": "1",
            "vncport": "6288",
            "vnc_passwd": "",
            "hvm": "0",
            "suspended": "0",
            "suspend_reason": "null",
            "nw_suspended": "a:2:{s:2:"id";i:0;s:6:"reason";s:26:"Suspended network by Admin";}",
            "rescue": "0",
            "band_suspend": "1",
            "tuntap": "0",
            "ppp": "0",
            "ploop": "0",
            "dns_nameserver": "a:0:{}",
            "osreinstall_limit": "0",
            "preferences": "null",
            "nic_type": "",
            "vif_type": "",
            "virtio": "0",
            "pv_on_hvm": "0",
            "kvm_cache": "",
            "io_mode": "",
            "cpu_mode": "",
            "total_iops_sec": "0",
            "read_bytes_sec": "0",
            "write_bytes_sec": "0",
            "kvm_vga": "0",
            "acceleration": "0",
            "vnc_keymap": "",
            "routing": "0",
            "mg": "",
            "used_bandwidth": "0.00",
            "webuzo": "0",
            "disable_ebtables": "0",
            "admin_managed": "0",
            "rdp": "0",
            "topology_sockets": "0",
            "topology_cores": "0",
            "topology_threads": "0",
            "mac": "",
            "notes": null,
            "disable_nw_config": "0",
            "email": "test@test.com",
            "server_name": "localhost",
            "os_distro": "centos",
            "distro": "centos_40.gif",
            "status": 1,
            "ips": {
                "s143228": "1.1.1.3"
            }
        }
    },
    "info": {
        "flags": {
            "enable_idsort": 1,
            "show_server": 0,
            "novnc": 1,
            "disable_java_vnc": 0
        }
    },
    "done": {
        "msg": "The VPS network has been suspended",
        "goto": "act=listvs",
        "vpsid": "3609"
    },
    "suspend_net": {
        "done": 1
    },
    "time_taken": "0.524"
}

HTTP Request

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

Parameters

Name Type Value Description Required
act GET listvs The action retrieves list of vps Yes
suspend_net POST vpsid The vpsid that will have its network suspended Yes

Network Unsuspend

curl -k -X GET -L "https://hostname:4083/index.php?act=listvs& 
unsuspend_net=3609&api=json&apikey=your_api_key& 
apipass=your_api_pass"
<?php   
    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  'your_api_pass';
    $pass = 'your_ppi_pass';
    $ip = 'your_Server_ip';

    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);
    $vpsid = 3609;
    $output = $admin->unsuspend_net($vpsid);
    print_r(json_encode($output));
?>

Result:The above code produces the following output

{
    "uid": "372",
    "act": "listvs",
    "timezone": 1,
    "timenow": "October 7, 2016, 7:40 am",
    "vpsid": "3591",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "Kini",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "Virtual Servers",
    "vs": {
        "3591": {
            "vpsid": "3591",
            "vps_name": "v2109",
            "uuid": "tj1jeuk9tdeubn2t",
            "serid": "0",
            "time": "1475544843",
            "edittime": "1475815482",
            "virt": "kvm",
            "uid": "372",
            "plid": "0",
            "hostname": "ApiByAmeya",
            "osid": "100081",
            "os_name": "create-template",
            "iso": "",
            "sec_iso": "",
            "boot": "cda",
            "space": "6",
            "inodes": "0",
            "ram": "1024",
            "burst": "0",
            "swap": "1024",
            "cpu": "1024",
            "cores": "4",
            "cpupin": "-1",
            "cpu_percent": "0.00",
            "bandwidth": "5",
            "network_speed": "0",
            "upload_speed": "-1",
            "io": "0",
            "ubc": "",
            "acpi": "1",
            "apic": "1",
            "pae": "1",
            "shadow": "0",
            "vnc": "1",
            "vncport": "6287",
            "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": "1",
            "acceleration": "1",
            "vnc_keymap": "de-ch",
            "routing": "0",
            "mg": "",
            "used_bandwidth": "0.00",
            "webuzo": "0",
            "disable_ebtables": "0",
            "admin_managed": "0",
            "rdp": "0",
            "topology_sockets": "0",
            "topology_cores": "0",
            "topology_threads": "0",
            "mac": "",
            "notes": null,
            "disable_nw_config": "0",
            "email": "test@test.com",
            "server_name": "localhost",
            "os_distro": "others",
            "distro": "others_40.gif",
            "status": 1,
            "ips": {
                "s8": "192.168.2.110"
            }
        },
        "3609": {
            "vpsid": "3609",
            "vps_name": "v2117",
            "uuid": "bibk7btcce26eauw",
            "serid": "0",
            "time": "1475817999",
            "edittime": "0",
            "virt": "kvm",
            "uid": "372",
            "plid": "0",
            "hostname": "test_userapi",
            "osid": "347",
            "os_name": "centos-6.6-x86_64",
            "iso": "",
            "sec_iso": "",
            "boot": "cda",
            "space": "10",
            "inodes": "0",
            "ram": "1024",
            "burst": "0",
            "swap": "1024",
            "cpu": "1024",
            "cores": "4",
            "cpupin": "-1",
            "cpu_percent": "200.00",
            "bandwidth": "0",
            "network_speed": "0",
            "upload_speed": "-1",
            "io": "0",
            "ubc": "",
            "acpi": "1",
            "apic": "1",
            "pae": "1",
            "shadow": "0",
            "vnc": "1",
            "vncport": "6288",
            "vnc_passwd": "",
            "hvm": "0",
            "suspended": "0",
            "suspend_reason": "null",
            "nw_suspended": "null",
            "rescue": "0",
            "band_suspend": "1",
            "tuntap": "0",
            "ppp": "0",
            "ploop": "0",
            "dns_nameserver": "a:0:{}",
            "osreinstall_limit": "0",
            "preferences": "null",
            "nic_type": "",
            "vif_type": "",
            "virtio": "0",
            "pv_on_hvm": "0",
            "kvm_cache": "",
            "io_mode": "",
            "cpu_mode": "",
            "total_iops_sec": "0",
            "read_bytes_sec": "0",
            "write_bytes_sec": "0",
            "kvm_vga": "0",
            "acceleration": "0",
            "vnc_keymap": "",
            "routing": "0",
            "mg": "",
            "used_bandwidth": "0.00",
            "webuzo": "0",
            "disable_ebtables": "0",
            "admin_managed": "0",
            "rdp": "0",
            "topology_sockets": "0",
            "topology_cores": "0",
            "topology_threads": "0",
            "mac": "",
            "notes": null,
            "disable_nw_config": "0",
            "email": "test@test.com",
            "server_name": "localhost",
            "os_distro": "centos",
            "distro": "centos_40.gif",
            "status": 1,
            "ips": {
                "s143228": "1.1.1.3"
            }
        }
    },
    "info": {
        "flags": {
            "enable_idsort": 1,
            "show_server": 0,
            "novnc": 1,
            "disable_java_vnc": 0
        }
    },
    "done": {
        "msg": "The VPS network has been unsuspended",
        "goto": "act=listvs",
        "vpsid": "3609"
    },
    "unsuspend_net": {
        "done": 1
    },
    "time_taken": "0.544"
}
{
    "uid": "372",
    "act": "listvs",
    "timezone": 1,
    "timenow": "October 7, 2016, 7:40 am",
    "vpsid": "3591",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "Kini",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "Virtual Servers",
    "vs": {
        "3591": {
            "vpsid": "3591",
            "vps_name": "v2109",
            "uuid": "tj1jeuk9tdeubn2t",
            "serid": "0",
            "time": "1475544843",
            "edittime": "1475815482",
            "virt": "kvm",
            "uid": "372",
            "plid": "0",
            "hostname": "ApiByAmeya",
            "osid": "100081",
            "os_name": "create-template",
            "iso": "",
            "sec_iso": "",
            "boot": "cda",
            "space": "6",
            "inodes": "0",
            "ram": "1024",
            "burst": "0",
            "swap": "1024",
            "cpu": "1024",
            "cores": "4",
            "cpupin": "-1",
            "cpu_percent": "0.00",
            "bandwidth": "5",
            "network_speed": "0",
            "upload_speed": "-1",
            "io": "0",
            "ubc": "",
            "acpi": "1",
            "apic": "1",
            "pae": "1",
            "shadow": "0",
            "vnc": "1",
            "vncport": "6287",
            "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": "1",
            "acceleration": "1",
            "vnc_keymap": "de-ch",
            "routing": "0",
            "mg": "",
            "used_bandwidth": "0.00",s:4:"33.7";}}",
            "webuzo": "0",
            "disable_ebtables": "0",
            "admin_managed": "0",
            "rdp": "0",
            "topology_sockets": "0",
            "topology_cores": "0",
            "topology_threads": "0",
            "mac": "",
            "notes": null,
            "disable_nw_config": "0",
            "email": "test@test.com",
            "server_name": "localhost",
            "os_distro": "others",
            "distro": "others_40.gif",
            "status": 1,
            "ips": {
                "s8": "192.168.2.110"
            }
        },
        "3609": {
            "vpsid": "3609",
            "vps_name": "v2117",
            "uuid": "bibk7btcce26eauw",
            "serid": "0",
            "time": "1475817999",
            "edittime": "0",
            "virt": "kvm",
            "uid": "372",
            "plid": "0",
            "hostname": "test_userapi",
            "osid": "347",
            "os_name": "centos-6.6-x86_64",
            "iso": "",
            "sec_iso": "",
            "boot": "cda",
            "space": "10",
            "inodes": "0",
            "ram": "1024",
            "burst": "0",
            "swap": "1024",
            "cpu": "1024",
            "cores": "4",
            "cpupin": "-1",
            "cpu_percent": "200.00",
            "bandwidth": "0",
            "network_speed": "0",
            "upload_speed": "-1",
            "io": "0",
            "ubc": "",
            "acpi": "1",
            "apic": "1",
            "pae": "1",
            "shadow": "0",
            "vnc": "1",
            "vncport": "6288",
            "vnc_passwd": "",
            "hvm": "0",
            "suspended": "0",
            "suspend_reason": "null",
            "nw_suspended": "null",
            "rescue": "0",
            "band_suspend": "1",
            "tuntap": "0",
            "ppp": "0",
            "ploop": "0",
            "dns_nameserver": "a:0:{}",
            "osreinstall_limit": "0",
            "preferences": "null",
            "nic_type": "",
            "vif_type": "",
            "virtio": "0",
            "pv_on_hvm": "0",
            "kvm_cache": "",
            "io_mode": "",
            "cpu_mode": "",
            "total_iops_sec": "0",
            "read_bytes_sec": "0",
            "write_bytes_sec": "0",
            "kvm_vga": "0",
            "acceleration": "0",
            "vnc_keymap": "",
            "routing": "0",
            "mg": "",
            "used_bandwidth": "0.00",
            "webuzo": "0",
            "disable_ebtables": "0",
            "admin_managed": "0",
            "rdp": "0",
            "topology_sockets": "0",
            "topology_cores": "0",
            "topology_threads": "0",
            "mac": "",
            "notes": null,
            "disable_nw_config": "0",
            "email": "test@test.com",
            "server_name": "localhost",
            "os_distro": "centos",
            "distro": "centos_40.gif",
            "status": 1,
            "ips": {
                "s143228": "1.1.1.3"
            }
        }
    },
    "info": {
        "flags": {
            "enable_idsort": 1,
            "show_server": 0,
            "novnc": 1,
            "disable_java_vnc": 0
        }
    },
    "done": {
        "msg": "The VPS network has been unsuspended",
        "goto": "act=listvs",
        "vpsid": "3609"
    },
    "unsuspend_net": {
        "done": 1
    },
    "time_taken": "0.544"
}

HTTP Request

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

Parameters

Name Type Value Description Required
act GET listvs The action returns the list of the vps Yes
unsuspend_net POST vpsid The vpsid that needs to have its network unsuspended Yes

Cloud Resources

curl -k -X GET -L "http://hostname:4082/index.php?act=cloudres&api=json&
apikey=your_api_key=your_api_pass"
<?php
    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'your_server_ip';

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

    $output = $admin->cloudres();
?>

Result: The above code produces the following output

{
    "uid": "372",
    "act": "cloudres",
    "timezone": 1,
    "timenow": "October 2, 2016, 6:43 am",
    "vpsid": "3589",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Cloud Resources",
    "resources": {
        "num_vs": 99998,
        "num_users": 15,
        "space": 42,
        "ram": 0,
        "burst": 1024,
        "bandwidth": 1000000,
        "num_ipv4": 48,
        "num_ipv6_subnet": 0,
        "num_ipv6": "0",
        "cores": "8",
        "num_cores": 9992,
        "allowed_virts": {
            "kvm": "kvm"
        }
    },
    "usage": {
        "num_cores": 8
    },
    "users": {
        "372": {
            "uid": "372",
            "email": "test@test.com"
        }
    },
    "res_limit": {
        "num_vs": "100000",
        "num_users": "15",
        "space": "50",
        "ram": "2048",
        "bandwidth": "1000000",
        "num_ipv4": "50",
        "num_ipv6_subnet": "0",
        "num_ipv6": "0",
        "num_cores": "10000",
        "cores": "8"
    },
    "time_taken": "0.127"
}
{
    "uid": "372",
    "act": "cloudres",
    "timezone": 1,
    "timenow": "October 2, 2016, 6:43 am",
    "vpsid": "3589",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Cloud Resources",
    "resources": {
        "num_vs": 99998,
        "num_users": 15,
        "space": 42,
        "ram": 0,
        "burst": 1024,
        "bandwidth": 1000000,
        "num_ipv4": 48,
        "num_ipv6_subnet": 0,
        "num_ipv6": "0",
        "cores": "8",
        "num_cores": 9992,
        "allowed_virts": {
            "kvm": "kvm"
        }
    },
    "usage": {
        "num_cores": 8
    },
    "users": {
        "372": {
            "uid": "372",
            "email": "test@test.com"
        }
    },
    "res_limit": {
        "num_vs": "100000",
        "num_users": "15",
        "space": "50",
        "ram": "2048",
        "bandwidth": "1000000",
        "num_ipv4": "50",
        "num_ipv6_subnet": "0",
        "num_ipv6": "0",
        "num_cores": "10000",
        "cores": "8"
    },
    "time_taken": "0.127"
}

HTTP Request

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

Parameters

Name Type Value Description Required
act POST cloudres The resources assigned and left for the cloud user Yes

User

List User


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

<?php

    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'your_Server_ip';

    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);
    $uid = 321;
    $output = $admin->users($uid);

    print_r(json_encode($output));

?>

Result:The above code produces the following output

{
    "uid": "321",
    "act": "users",
    "timezone": 1,
    "timenow": "September 20, 2016, 3:22 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Users",
    "user_list": {
        "376": {
            "uid": "376",
            "password": "xxxxxxxxxx",
            "email": "test123@test.com",
            "type": "0",
            "aclid": "0",
            "pid": "321",
            "num_vs": "0",
            "num_users": "0",
            "space": "0",
            "ram": "0",
            "burst": "0",
            "bandwidth": "0",
            "cpu": "0",
            "cores": "0",
            "cpu_percent": "0",
            "num_cores": "0",
            "num_ipv4": "0",
            "num_ipv6": "0",
            "num_ipv6_subnet": "0",
            "allowed_virts": "",
            "network_speed": "0",
            "upload_speed": "0",
            "openvz": "0",
            "xen": "0",
            "xenhvm": "0",
            "kvm": "0",
            "sg": null,
            "mg": null,
            "preferences": null,
            "dnsplid": "0",
            "date_created": "0",
            "service_period": "0",
            "band_suspend": "0"
        },
        "377": {
            "uid": "377",
            "password": "xxxxxxxxxxxxxx",
            "email": "test234@test.com",
            "type": "0",
            "aclid": "0",
            "pid": "321",
            "num_vs": "0",
            "num_users": "0",
            "space": "0",
            "ram": "0",
            "burst": "0",
            "bandwidth": "0",
            "cpu": "0",
            "cores": "0",
            "cpu_percent": "0",
            "num_cores": "0",
            "num_ipv4": "0",
            "num_ipv6": "0",
            "num_ipv6_subnet": "0",
            "allowed_virts": "",
            "network_speed": "0",
            "upload_speed": "0",
            "openvz": "0",
            "xen": "0",
            "xenhvm": "0",
            "kvm": "0",
            "sg": null,
            "mg": null,
            "preferences": null,
            "dnsplid": "0",
            "date_created": "0",
            "service_period": "0",
            "band_suspend": "0"
        }
    },
    "time_taken": "0.080"
}
{
    "uid": "321",
    "act": "users",
    "timezone": 1,
    "timenow": "September 20, 2016, 3:22 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Users",
    "user_list": {
        "376": {
            "uid": "376",
            "password": "xxxxxxxxxxxxxxxxxxx",
            "email": "test123@test.com",
            "type": "0",
            "aclid": "0",
            "pid": "321",
            "num_vs": "0",
            "num_users": "0",
            "space": "0",
            "ram": "0",
            "burst": "0",
            "bandwidth": "0",
            "cpu": "0",
            "cores": "0",
            "cpu_percent": "0",
            "num_cores": "0",
            "num_ipv4": "0",
            "num_ipv6": "0",
            "num_ipv6_subnet": "0",
            "allowed_virts": "",
            "network_speed": "0",
            "upload_speed": "0",
            "openvz": "0",
            "xen": "0",
            "xenhvm": "0",
            "kvm": "0",
            "sg": null,
            "mg": null,
            "preferences": null,
            "dnsplid": "0",
            "date_created": "0",
            "service_period": "0",
            "band_suspend": "0"
        },
        "377": {
            "uid": "377",
            "password": "xxxxxxxxxxxxxxxxxxx",
            "email": "test234@test.com",
            "type": "0",
            "aclid": "0",
            "pid": "321",
            "num_vs": "0",
            "num_users": "0",
            "space": "0",
            "ram": "0",
            "burst": "0",
            "bandwidth": "0",
            "cpu": "0",
            "cores": "0",
            "cpu_percent": "0",
            "num_cores": "0",
            "num_ipv4": "0",
            "num_ipv6": "0",
            "num_ipv6_subnet": "0",
            "allowed_virts": "",
            "network_speed": "0",
            "upload_speed": "0",
            "openvz": "0",
            "xen": "0",
            "xenhvm": "0",
            "kvm": "0",
            "sg": null,
            "mg": null,
            "preferences": null,
            "dnsplid": "0",
            "date_created": "0",
            "service_period": "0",
            "band_suspend": "0"
        }
    },
    "time_taken": "0.080"
}

HTTP Request

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

Parameters

Name Type Value Description Required
act GET users The act which has to be carried out to retrieve data Yes
uid POST Int The user id whose users have to be listed Yes

Add User

curl -k -X POST -d "adduser=1& 
user_email=test425@softa.com&user_password=test012" 
-L "http://hostname:4082/index.php?act=adduser&api=json& 
apikey=your_api_key&apipass=your_api_pass&do=1"
<?php
    require_once('enduser.php');

    $key =  '';
    $pass = '';
    $ip = '';
    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);
    $post = array();
    $post['adduser'] = 1;
    $post['user_email'] = 'test@est.com';
    $post['user_password'] = 'xxxxx';
    $post['pid'] = 299;
    $output = $admin->adduser($post);
    print_r(json_encode($output));
?>

Result: The above code will produce the following output

{
    "uid": "321",
    "act": "adduser",
    "timezone": 1,
    "timenow": "September 23, 2016, 5:02 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Add User",
    "done": {
        "msg": "User has been added",
        "goto": "act=users"
    },
    "time_taken": "0.090"
}
{
    "uid": "321",
    "act": "adduser",
    "timezone": 1,
    "timenow": "September 23, 2016, 5:02 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Add User",
    "done": {
        "msg": "User has been added",
        "goto": "act=users"
    },
    "time_taken": "0.090"
}

HTTP Request

https://hostname:4083/index.phpact=addusers

Parameters

Name Type Value Description Required
act GET addusers The action which will be performed to retrieve data Yes
adduser POST 1 If set, then user will be added Yes
user_email POST user_email The email id of the user that needs to be added Yes
user_password POST user_pass The password of the user that will be required during login Yes
pid POST pid This indicates if the user will be added under an existing user No

Edit User

curl -k -X POST -d "edituser=1&user_email=avin_test@softa.com& 
user_password=test012" -L 
"https://hostname:4083/index.php?act=edituser&uid=383&api=json& 
apikey=your_api_key&apipass=your_api_pass&do=1"
<?php
    require_once('enduser.php');

    $key =  '';
    $pass = '';
    $ip = '';
    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);

    $uid = 369;
    $post = array();
    $post['edituser'] = 1;
    $post['user_email'] = 'test@test.com';
    $post['user_password'] = 'xxxxxxxxx';   

    $output = $admin->edituser($uid, $post);

    print_r(json_encode($output));
?>

Result:The above code produces the following output

{
    "uid": "321",
    "act": "edituser",
    "timezone": 1,
    "timenow": "September 23, 2016, 5:22 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Edit User",
    "edit_user": {
        "uid": "383",
        "email": "test425@softa.com",
        "type": "0",
        "aclid": "0",
        "pid": "321",
        "num_vs": "0",
        "num_users": "0",
        "space": "0",
        "ram": "0",
        "burst": "0",
        "bandwidth": "0",
        "cpu": "0",
        "cores": "0",
        "cpu_percent": "0",
        "num_cores": "0",
        "num_ipv4": "0",
        "num_ipv6": "0",
        "num_ipv6_subnet": "0",
        "allowed_virts": "",
        "network_speed": "0",
        "upload_speed": "0",
        "openvz": "0",
        "xen": "0",
        "xenhvm": "0",
        "kvm": "0",
        "sg": null,
        "mg": null,
        "preferences": null,
        "dnsplid": "0",
        "date_created": "0",
        "service_period": "0",
        "band_suspend": "0"
    },
    "done": {
        "msg": "User has been edited",
        "goto": "act=users"
    },
    "time_taken": "0.100"
}
{
    "uid": "321",
    "act": "edituser",
    "timezone": 1,
    "timenow": "September 23, 2016, 5:22 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Edit User",
    "edit_user": {
        "uid": "383",
        "email": "test425@softa.com",
        "type": "0",
        "aclid": "0",
        "pid": "321",
        "num_vs": "0",
        "num_users": "0",
        "space": "0",
        "ram": "0",
        "burst": "0",
        "bandwidth": "0",
        "cpu": "0",
        "cores": "0",
        "cpu_percent": "0",
        "num_cores": "0",
        "num_ipv4": "0",
        "num_ipv6": "0",
        "num_ipv6_subnet": "0",
        "allowed_virts": "",
        "network_speed": "0",
        "upload_speed": "0",
        "openvz": "0",
        "xen": "0",
        "xenhvm": "0",
        "kvm": "0",
        "sg": null,
        "mg": null,
        "preferences": null,
        "dnsplid": "0",
        "date_created": "0",
        "service_period": "0",
        "band_suspend": "0"
    },
    "done": {
        "msg": "User has been edited",
        "goto": "act=users"
    },
    "time_taken": "0.100"
}

HTTP Request

https://hostname:4083/index.php?act=edituser&uid=uid

Parameters

Name Type Value Description Required
act GET edituser The action performed to retrieve data Yes
uid POST Int The user id which needs to be edited Yes
edituser POST 1 If set then the user info will be edited Yes
user_email POST user_email Email id of the user Yes
user_password POST user_pass Password of the user Yes

Delete User

curl -k -X GET -L "https://hostname:4083/index.php?act=users& 
delete=387&api=json&apikey=your_api_key& 
apipass=your_api_pass"
<?php
    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'your_server_ip';

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

    $delete = 389;
    $output = $admin->delete_users($delete);
    print_r(json_encode($output));

Result:The above code returns the following result

{
    "uid": "372",
    "act": "users",
    "timezone": 1,
    "timenow": "October 7, 2016, 4:34 am",
    "vpsid": "3589",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "Kini",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "Users",
    "user_list": {
        "389": {
            "uid": "389",
            "password": "$1$.pnnY8lq$YKo8y/zDPqBHtUU0u5kAG1",
            "email": "test@example.com",
            "type": "0",
            "aclid": "0",
            "pid": "372",
            "num_vs": "0",
            "num_users": "0",
            "space": "0",
            "ram": "0",
            "burst": "0",
            "bandwidth": "0",
            "cpu": "0",
            "cores": "0",
            "cpu_percent": "0",
            "num_cores": "0",
            "num_ipv4": "0",
            "num_ipv6": "0",
            "num_ipv6_subnet": "0",
            "allowed_virts": "",
            "network_speed": "0",
            "upload_speed": "0",
            "openvz": "0",
            "xen": "0",
            "xenhvm": "0",
            "kvm": "0",
            "sg": null,
            "mg": null,
            "preferences": null,
            "dnsplid": "0",
            "date_created": "0",
            "service_period": "0",
            "band_suspend": "0",
            "suspended": null,
            "suspend_reason": null
        }
    },
    "done": {
        "msg": "The User has been deleted",
        "goto": "act=users"
    },
    "time_taken": "0.085"
}
{
    "uid": "372",
    "act": "users",
    "timezone": 1,
    "timenow": "October 7, 2016, 4:34 am",
    "vpsid": "3589",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "Kini",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "Users",
    "user_list": {
        "389": {
            "uid": "389",
            "password": "$1$.pnnY8lq$YKo8y/zDPqBHtUU0u5kAG1",
            "email": "test@example.com",
            "type": "0",
            "aclid": "0",
            "pid": "372",
            "num_vs": "0",
            "num_users": "0",
            "space": "0",
            "ram": "0",
            "burst": "0",
            "bandwidth": "0",
            "cpu": "0",
            "cores": "0",
            "cpu_percent": "0",
            "num_cores": "0",
            "num_ipv4": "0",
            "num_ipv6": "0",
            "num_ipv6_subnet": "0",
            "allowed_virts": "",
            "network_speed": "0",
            "upload_speed": "0",
            "openvz": "0",
            "xen": "0",
            "xenhvm": "0",
            "kvm": "0",
            "sg": null,
            "mg": null,
            "preferences": null,
            "dnsplid": "0",
            "date_created": "0",
            "service_period": "0",
            "band_suspend": "0",
            "suspended": null,
            "suspend_reason": null
        }
    },
    "done": {
        "msg": "The User has been deleted",
        "goto": "act=users"
    },
    "time_taken": "0.085"
}

HTTP Request

https://hostname:4083/index.php?act=users&delete=uid

Parameters

Name Type Value Description Required
act GET users The action will return the list of users Yes
delete GET Int Delete the user by specifying the user id i.e. uid Yes

Profile

 curl -k -X POST -d "savedetails=1&fname=test&lname=compiler" 
 -L "https://hostname:4083/index.php?act=profile&api=json&
 apikey=your_api_key&apipass=your_api_pass&do=1"
<?php
    require_once('admin.php');

    $key =  '';
    $pass = '';
    $ip = '';
    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);

        $post = array();
    $post['savedetails'] = 1;
    $post['fname'] = 'test';
    $post['lname'] = 'test';

    $output = $admin->profile($post);

    print_r(json_encode($output));
?>

Result:The above code produces the following output

{
    "uid": "321",
    "act": "profile",
    "timezone": 1,
    "timenow": "September 23, 2016, 5:27 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "User Profile",
    "done": {
        "msg": "Your changes have been saved successfully"
    },
    "time_taken": "0.097"
}
{
    "uid": "321",
    "act": "profile",
    "timezone": 1,
    "timenow": "September 23, 2016, 5:27 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "User Profile",
    "done": {
        "msg": "Your changes have been saved successfully"
    },
    "time_taken": "0.097"
}

HTTP Request

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

Parameters

Name Type Value Description Required
act GET profile The action specified to carry out the operation Yes
fname POST fname The first name of the user Yes
lname POST lname The last name of the user Yes
savedetails POST 1 IF set then the user details will be saved Yes

User Settings

curl -k -X POST -d "editsettings=1&language=polish&skins=default& 
timezone=1" -L 
"https://hostname:4083/index.php?act=usersettings&api=json& 
apikey=your_api_key&apipass=your_api_pass&do=1"
<?php
    require_once('enduser.php');

    $key =  '';
    $pass = '';
    $ip = '';
    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);

    $post = array();
    $post['editsettings'] = 1;
    $post['language'] = 'english';
    $post['skins'] = 'default';
    $post['timezone'] = '(GMT -3:30) Newfoundland';

    $output = $admin->usersettings($post);

    print_r(json_encode($output));
?>

Result: The above code produces the following output

{
    "uid": "321",
    "act": "usersettings",
    "timezone": 1,
    "timenow": "September 23, 2016, 5:38 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Users Settings",
    "done": {
        "msg": "Your settings were saved successfully"
    },
    "skins": {
        "default": "default"
    },
    "languages": {
        "polish": "polish",
        "english": "english",
        "german": "german",
        "chinese": "chinese",
        "portuguese": "portuguese",
        "dutch": "dutch",
        "french": "french"
    },
    "timezones": [-12, -11, -10, -9, -8, -7, -6, -5, -4, -3.5, -3, -2, -1, 0, 1, 2, 3, 3.5, 4, 4.5, 5, 5.5, 6, 6.5, 7, 8, 9, 9.5, 10, 11, 12],
    "timezone_names": ["(GMT -12:00) Eniwetok, Kwajalein", "(GMT -11:00) Midway Island, Samoa", "(GMT -10:00) Hawaii", "(GMT -9:00) Alaska", "(GMT -8:00) Pacific Time (US &amp; Canada)", "(GMT -7:00) Mountain Time (US &amp; Canada)", "(GMT -6:00) Central Time (US &amp; Canada), Mexico City", "(GMT -5:00) Eastern Time (US &amp; Canada), Bogota, Lima", "(GMT -4:00) Atlantic Time (Canada), Caracas, La Paz", "(GMT -3:30) Newfoundland", "(GMT -3:00) Brazil, Buenos Aires, Georgetown", "(GMT -2:00) Mid-Atlantic", "(GMT -1:00 hour) Azores, Cape Verde Islands", "(GMT) Western Europe Time, London, Lisbon, Casablanca", "(GMT +1:00 hour) Brussels, Copenhagen, Madrid, Paris", "(GMT +2:00) Kaliningrad, South Africa", "(GMT +3:00) Baghdad, Riyadh, Moscow, St. Petersburg", "(GMT +3:30) Tehran", "(GMT +4:00) Abu Dhabi, Muscat, Baku, Tbilisi", "(GMT +4:30) Kabul", "(GMT +5:00) Ekaterinburg, Islamabad, Karachi, Tashkent", "(GMT +5:30) Bombay, Calcutta, Madras, New Delhi", "(GMT +6:00) Almaty, Dhaka, Colombo", "(GMT +6:30) Yangon, Myanmar", "(GMT +7:00) Bangkok, Hanoi, Jakarta", "(GMT +8:00) Beijing, Perth, Singapore, Hong Kong", "(GMT +9:00) Tokyo, Seoul, Osaka, Sapporo, Yakutsk", "(GMT +9:30) Adelaide, Darwin", "(GMT +10:00) Eastern Australia, Guam, Vladivostok", "(GMT +11:00) Magadan, Solomon Islands, New Caledonia", "(GMT +12:00) Auckland, Wellington, Fiji, Kamchatka"],
    "time_taken": "0.107"
}
{
    "uid": "321",
    "act": "usersettings",
    "timezone": 1,
    "timenow": "September 23, 2016, 5:38 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Users Settings",
    "done": {
        "msg": "Your settings were saved successfully"
    },
    "skins": {
        "default": "default"
    },
    "languages": {
        "polish": "polish",
        "english": "english",
        "german": "german",
        "chinese": "chinese",
        "portuguese": "portuguese",
        "dutch": "dutch",
        "french": "french"
    },
    "timezones": [-12, -11, -10, -9, -8, -7, -6, -5, -4, -3.5, -3, -2, -1, 0, 1, 2, 3, 3.5, 4, 4.5, 5, 5.5, 6, 6.5, 7, 8, 9, 9.5, 10, 11, 12],
    "timezone_names": ["(GMT -12:00) Eniwetok, Kwajalein", "(GMT -11:00) Midway Island, Samoa", "(GMT -10:00) Hawaii", "(GMT -9:00) Alaska", "(GMT -8:00) Pacific Time (US &amp; Canada)", "(GMT -7:00) Mountain Time (US &amp; Canada)", "(GMT -6:00) Central Time (US &amp; Canada), Mexico City", "(GMT -5:00) Eastern Time (US &amp; Canada), Bogota, Lima", "(GMT -4:00) Atlantic Time (Canada), Caracas, La Paz", "(GMT -3:30) Newfoundland", "(GMT -3:00) Brazil, Buenos Aires, Georgetown", "(GMT -2:00) Mid-Atlantic", "(GMT -1:00 hour) Azores, Cape Verde Islands", "(GMT) Western Europe Time, London, Lisbon, Casablanca", "(GMT +1:00 hour) Brussels, Copenhagen, Madrid, Paris", "(GMT +2:00) Kaliningrad, South Africa", "(GMT +3:00) Baghdad, Riyadh, Moscow, St. Petersburg", "(GMT +3:30) Tehran", "(GMT +4:00) Abu Dhabi, Muscat, Baku, Tbilisi", "(GMT +4:30) Kabul", "(GMT +5:00) Ekaterinburg, Islamabad, Karachi, Tashkent", "(GMT +5:30) Bombay, Calcutta, Madras, New Delhi", "(GMT +6:00) Almaty, Dhaka, Colombo", "(GMT +6:30) Yangon, Myanmar", "(GMT +7:00) Bangkok, Hanoi, Jakarta", "(GMT +8:00) Beijing, Perth, Singapore, Hong Kong", "(GMT +9:00) Tokyo, Seoul, Osaka, Sapporo, Yakutsk", "(GMT +9:30) Adelaide, Darwin", "(GMT +10:00) Eastern Australia, Guam, Vladivostok", "(GMT +11:00) Magadan, Solomon Islands, New Caledonia", "(GMT +12:00) Auckland, Wellington, Fiji, Kamchatka"],
    "time_taken": "0.107"
}

HTTP Request

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

Parameters

Name Type Value Description Required
act GET usersettings The action which is specified to carry out specific operation Yes
editsettings POST 1 If set then the user settings will be edited Yes
language POST language The language of the panel will be set Eg : polish, english Yes
skins POST skins This will set the theme for the panel Eg: Currently selected theme will be “default” Yes theme.Otherwise user can pass name of the custom theme directory under /usr/local/virtualizor/enduser/themes
timezone POST timezone This will set the appropriate time zone for the user. Value will range from -12 to +12 Yes

For selecting the timezone follow the table given below:

Value Timezone
-12 (GMT -12:00) Eniwetok, Kwajalein
-11 (GMT -11:00) Midway Island, Samoa
-10 (GMT -10:00) Hawaii
-9 (GMT -9:00) Alaska
-8 (GMT -8:00) Pacific Time (US & Canada)
-7 (GMT -7:00) Mountain Time (US & Canada)
-6 (GMT -6:00) Central Time (US & Canada), Mexico City
-5 (GMT -5:00) Eastern Time (US & Canada), Bogota, Lima
-4 (GMT -4:00) Atlantic Time (Canada), Caracas, La Paz
-3.5 (GMT -3:30) Newfoundland
-3 (GMT -3:00) Brazil, Buenos Aires, Georgetown
-2 (GMT -2:00) Mid-Atlantic
-1 (GMT -1:00 hour) Azores, Cape Verde Islands
0 (GMT) Western Europe Time, London, Lisbon, Casablanca
1 (GMT +1:00 hour) Brussels, Copenhagen, Madrid, Paris
2 (GMT +2:00) Kaliningrad, South Africa
3 (GMT +3:00) Baghdad, Riyadh, Moscow, St. Petersburg
3.5 (GMT +3:30) Tehran
4 (GMT +4:00) Abu Dhabi, Muscat, Baku, Tbilisi
4.5 (GMT +4:30) Kabul
5 (GMT +5:00) Ekaterinburg, Islamabad, Karachi, Tashkent
5.5 (GMT +5:30) Bombay, Calcutta, Madras, New Delhi
6 (GMT +6:00) Almaty, Dhaka, Colombo
6.5 (GMT +6:30) Yangon, Myanmar
7 (GMT +7:00) Bangkok, Hanoi, Jakarta
8 (GMT +8:00) Beijing, Perth, Singapore, Hong Kong
9 (GMT +9:00) Tokyo, Seoul, Osaka, Sapporo, Yakutsk
9.5 (GMT +9:30) Adelaide, Darwin
10 (GMT +10:00) Eastern Australia, Guam Vladivostok
11 (GMT +11:00) Magadan, Solomon Islands, New Caledonia
12 (GMT +12:00) Auckland, Wellington, Fiji, Kamchatka

Account Password

 curl -k -X POST -d "changepass=1&newpass=test123&conf=test123" 
-L "https://hostname:4083/index.php?act=userpassword&api=json& 
apikey=your_api_key&apipass=your_api_pass&do=1"
<?php
    require_once('enduser.php');

    $key =  '';
    $pass = '';
    $ip = '';
    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);

    $post = array();
    $post['newpass'] = 'test@123';
    $post['conf'] = 'test@123';
    $post['changepass'] =1;

    $output = $admin->userpassword($post);

    print_r(json_encode($output));
?>

Result: the above code produces the following output

{
    "uid": "321",
    "act": "userpassword",
    "timezone": 1,
    "timenow": "September 23, 2016, 5:49 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Users Password",
    "done": {
        "msg": "Your Password has been changed successfully"
    },
    "time_taken": "0.098"
}
{
    "uid": "321",
    "act": "userpassword",
    "timezone": 1,
    "timenow": "September 23, 2016, 5:49 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Users Password",
    "done": {
        "msg": "Your Password has been changed successfully"
    },
    "time_taken": "0.098"
}

HTTP Request

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

Parameters

Name Type Value Description Required
act GET userpassword The action specified to perform the operation and return the data YEs
newpass POST newpass The new password to be set Yes
confirm POST confirm Confirmation for the password Yes
changepass POST 1 If set, then the password of the user will be changed Yes

DNS

List DNS Server

curl -k -X GET -L "https://kvm.nuftp.com:4083/index.php?act=pdns
&api=json&apikey=your_api_key&
apipass=your_api_pass" 
    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'your_server_ip';

    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);
    $output = $admin->pdns($id,$post);
    print_r(json_encode($output));


?>

Result: The above code will return the following output

{
    "uid": "372",
    "act": "pdns",
    "timezone": 1,
    "timenow": "October 12, 2016, 6:22 am",
    "vpsid": "3591",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http:\/\/softaculous.com",
    "title": "DNS Management",
    "domains": {
        "3": {
            "id": "3",
            "name": "10.168.192.in-addr.arpa",
            "master": null,
            "last_check": null,
            "type": "NATIVE",
            "notified_serial": null,
            "account": null,
            "virtualizor_uid": "372"
        }
    },
    "time_taken": "0.104"
}
{
    "uid": "372",
    "act": "pdns",
    "timezone": 1,
    "timenow": "October 12, 2016, 6:22 am",
    "vpsid": "3591",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http:\/\/softaculous.com",
    "title": "DNS Management",
    "domains": {
        "3": {
            "id": "3",
            "name": "10.168.192.in-addr.arpa",
            "master": null,
            "last_check": null,
            "type": "NATIVE",
            "notified_serial": null,
            "account": null,
            "virtualizor_uid": "372"
        }
    },
    "time_taken": "0.104"
}

HTTP Request

https://hostname:4085/index.php?act=pdns

Parameters

Name Type Value Description Required
act GET pdns The action will add a DNS Zone Yes

Add DNS

curl -k -X POST -d "addzone=1&zone_name=test1.com" -L 
"https://kvm.nuftp.com:4083/index.php?act=pdns&
api=json&apikey=KDIPCVXAL1W8XWFY&
apipass=igiozyai6cf4zmvxgu3gmxa1nkayjshz"

<?php
    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'your_server_ip';

    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);
    $post['addzone'] = 1;
    $post['zone_name'] = "test1.com";
    //$id['del'] = '';*/
    $output = $admin->pdns($post);
    print_r(json_encode($output));  
?>

Result: The above code produces the following output

{
    "uid": "5",
    "act": "pdns",
    "timezone": 1,
    "timenow": "October 17, 2016, 9:17 am",
    "vpsid": "3587",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "",
        "lname": "",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "1"
    },
    "pdns": {
        "pdnsid": "1"
    },
    "support_link": "http:\/\/softaculous.com",
    "disable_login_logo": 1,
    "title": "DNS Management",
    "add_done": 6,
    "done": {
        "msg": "The Zone has been added successfully",
        "goto": "act=pdns"
    },
    "domains": {
        "2": {
            "id": "2",
            "name": "test123.com",
            "master": null,
            "last_check": null,
            "type": "MASTER",
            "notified_serial": null,
            "account": null,
            "solusvm_cid": "5"
        },
        "6": {
            "id": "6",
            "name": "test234.com",
            "master": null,
            "last_check": null,
            "type": "MASTER",
            "notified_serial": null,
            "account": null,
            "solusvm_cid": "5"
        }
    },
    "time_taken": "0.203"
}
{
    "uid": "5",
    "act": "pdns",
    "timezone": 1,
    "timenow": "October 17, 2016, 9:17 am",
    "vpsid": "3587",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "",
        "lname": "",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "1"
    },
    "pdns": {
        "pdnsid": "1"
    },
    "support_link": "http:\/\/softaculous.com",
    "disable_login_logo": 1,
    "title": "DNS Management",
    "add_done": 6,
    "done": {
        "msg": "The Zone has been added successfully",
        "goto": "act=pdns"
    },
    "domains": {
        "2": {
            "id": "2",
            "name": "test123.com",
            "master": null,
            "last_check": null,
            "type": "MASTER",
            "notified_serial": null,
            "account": null,
            "solusvm_cid": "5"
        },
        "6": {
            "id": "6",
            "name": "test234.com",
            "master": null,
            "last_check": null,
            "type": "MASTER",
            "notified_serial": null,
            "account": null,
            "solusvm_cid": "5"
        }
    },
    "time_taken": "0.203"
}

HTTP Request

https://hostname:4085/index.php?act=pdns

Parameters

Name Type Value Description Required
act GET pdns The action will be used to add dns zone Yes
addzone POST 1/0 IF set then the DNS zone will be set Yes
zone_name POST 1/0 This specifies the zone name Yes

Delete DNS

curl -k -X POST -d "del=11" -L 
"https://kvm.nuftp.com:4083/index.php?act=pdns&
api=json&apikey=KDIPCVXAL1W8XWFY&
apipass=igiozyai6cf4zmvxgu3gmxa1nkayjshz"
<?php
    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'your_server_ip';

    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);
    $id = 11;
    $output = $admin->pdns($post);
    print_r(json_encode($output));  
?>

Result: The above code produces the following result

{
    "uid": "5",
    "act": "pdns",
    "timezone": 1,
    "timenow": "October 14, 2016, 12:44 pm",
    "vpsid": "3587",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "",
        "lname": "",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "1"
    },
    "pdns": {
        "pdnsid": "1"
    },
    "support_link": "http:\/\/softaculous.com",
    "disable_login_logo": 1,
    "title": "DNS Management",
    "delete_done": true,
    "done": {
        "msg": "The Zone has been deleted successfully",
        "goto": "act=pdns"
    },
    "domains": {
        "2": {
            "id": "2",
            "name": "test123.com",
            "master": null,
            "last_check": null,
            "type": "MASTER",
            "notified_serial": null,
            "account": null,
            "solusvm_cid": "5"
        }
    },
    "time_taken": "0.089"
}

HTTP Request

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

Parameters

Name Type Value Description Required
act GET pdns The action will delete the dns entries and return the result Yes
id POST Int The entry that needs to be deleted. Yes

Reverse DNS

List RDNS

curl -k -X GET -L "https://xcp.nuftp.com:4083/index.php?act=rdns&
api=json&apikey=your_api_key&
apipass=your_api_pass"
<?php
    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'your_server_ip';

    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);
    $output = $admin->rdns();

    print_r(json_encode($output));  
?>

Result: The above code produces the following result

{
    "uid": "5",
    "act": "rdns",
    "timezone": 1,
    "timenow": "October 14, 2016, 1:15 pm",
    "vpsid": "3587",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "",
        "lname": "",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "1"
    },
    "pdns": {
        "pdnsid": "1"
    },
    "support_link": "http:\/\/softaculous.com",
    "disable_login_logo": 1,
    "title": "Add Reverse DNS",
    "allowed_ip": {
        "107.189.35.165": {
            "ipid": "210417",
            "ip": "107.189.35.165",
            "ipv6": "0",
            "ipr_ips": "",
            "ipr_netmask": "",
            "vpsid": "3587",
            "hostname": "test_userapi"
        }
    },
    "rdns_records": {
        "15": {
            "id": "15",
            "domain_id": "1",
            "name": "165.35.189.107.in-addr.arpa",
            "type": "PTR",
            "content": "test123.com",
            "ttl": "86400",
            "prio": "0",
            "change_date": "1476446323",
            "ip": "107.189.35.165"
        }
    },
    "time_taken": "0.192"
}

HTTP Request

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

Parameters

Name Type Value Description Required
act GET rdns The action will retrieve all RDNS Records Yes

Add Reverse DNS

curl -k -X POST -d "addzone=1&zone_name=test234.com" -L 
"https://xcp.nuftp.com:4083/index.php?act=pdns&
api=json&apikey=your_api_key&
apipass=your_api_pass"
<?php
    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'your_sedr';

    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);
    $post['rdns'] = 1;
    $post['rdns_ip'] = '192.168.3.6';
    $post['rdns_domain'] = 'test_client.com';

    $output = $admin->rdns($post);

    print_r(json_encode($output));  

?>

Result: The above code will produce the following output

{
    "uid": "5",
    "act": "rdns",
    "timezone": 1,
    "timenow": "October 17, 2016, 12:46 pm",
    "vpsid": "3587",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "",
        "lname": "",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "1"
    },
    "pdns": {
        "pdnsid": "1"
    },
    "support_link": "http:\/\/softaculous.com",
    "disable_login_logo": 1,
    "title": "Add Reverse DNS",
    "done": {
        "msg": "The reverse DNS zone has been successfully added",
        "goto": "act=rdns"
    },
    "allowed_ip": {
        "107.189.35.165": {
            "ipid": "210417",
            "ip": "107.189.35.165",
            "ipv6": "0",
            "ipr_ips": "",
            "ipr_netmask": "",
            "vpsid": "3587",
            "hostname": "test_userapi"
        },
        "192.168.3.6": {
            "ipid": "6",
            "ip": "192.168.3.6",
            "ipv6": "0",
            "ipr_ips": "",
            "ipr_netmask": "",
            "vpsid": "3587",
            "hostname": "test_userapi"
        },
        "192.168.11.5": {
            "ipid": "7",
            "ip": "192.168.11.5",
            "ipv6": "0",
            "ipr_ips": "",
            "ipr_netmask": "",
            "vpsid": "3587",
            "hostname": "test_userapi"
        }
    },
    "rdns_records": {
        "15": {
            "id": "15",
            "domain_id": "1",
            "name": "165.35.189.107.in-addr.arpa",
            "type": "PTR",
            "content": "test123.com",
            "ttl": "86400",
            "prio": "0",
            "change_date": "1476446323",
            "ip": "107.189.35.165"
        }
    },
    "time_taken": "0.086"
}
{
    "uid": "5",
    "act": "rdns",
    "timezone": 1,
    "timenow": "October 17, 2016, 12:46 pm",
    "vpsid": "3587",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "",
        "lname": "",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "1"
    },
    "pdns": {
        "pdnsid": "1"
    },
    "support_link": "http:\/\/softaculous.com",
    "disable_login_logo": 1,
    "title": "Add Reverse DNS",
    "done": {
        "msg": "The reverse DNS zone has been successfully added",
        "goto": "act=rdns"
    },
    "allowed_ip": {
        "107.189.35.165": {
            "ipid": "210417",
            "ip": "107.189.35.165",
            "ipv6": "0",
            "ipr_ips": "",
            "ipr_netmask": "",
            "vpsid": "3587",
            "hostname": "test_userapi"
        },
        "192.168.3.6": {
            "ipid": "6",
            "ip": "192.168.3.6",
            "ipv6": "0",
            "ipr_ips": "",
            "ipr_netmask": "",
            "vpsid": "3587",
            "hostname": "test_userapi"
        },
        "192.168.11.5": {
            "ipid": "7",
            "ip": "192.168.11.5",
            "ipv6": "0",
            "ipr_ips": "",
            "ipr_netmask": "",
            "vpsid": "3587",
            "hostname": "test_userapi"
        }
    },
    "rdns_records": {
        "15": {
            "id": "15",
            "domain_id": "1",
            "name": "165.35.189.107.in-addr.arpa",
            "type": "PTR",
            "content": "test123.com",
            "ttl": "86400",
            "prio": "0",
            "change_date": "1476446323",
            "ip": "107.189.35.165"
        }
    },
    "time_taken": "0.086"
}

HTTP Request

https://hostname:4085/index.php?act=rdns

Parameters

Name Type Value Description Required
act GET rdns The action will add rdns entry Yes
rdns POST 1/0 If set then the rdns will be added. Yes
rdns_ip POST rdns_ip Specify the ip address that has to be added Yes
rdns_domain POST rdns_domain Specify the domain name to be added along with the IP address. Yes

Delete RDNS

curl -k -X GET -L "https://xcp.nuftp.com:4083/index.php?act=rdns&
delete=23&api=json&apikey=your_api_key&
apipass=your_api_pass"
<?php
    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'your_server_ip';

    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);
    $post['delete'] = 24;

    $output = $admin->rdns($post);

    print_r(json_encode($output));


?>

Result: The above code will produce the following output

{
    "uid": "5",
    "act": "rdns",
    "timezone": 1,
    "timenow": "October 17, 2016, 1:05 pm",
    "vpsid": "3587",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "",
        "lname": "",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "1"
    },
    "pdns": {
        "pdnsid": "1"
    },
    "support_link": "http:\/\/softaculous.com",
    "disable_login_logo": 1,
    "title": "Add Reverse DNS",
    "done": {
        "msg": "The rDNS record has been deleted",
        "goto": "act=rdns"
    },
    "deleted": 1,
    "allowed_ip": {
        "107.189.35.165": {
            "ipid": "210417",
            "ip": "107.189.35.165",
            "ipv6": "0",
            "ipr_ips": "",
            "ipr_netmask": "",
            "vpsid": "3587",
            "hostname": "test_userapi"
        },
        "192.168.3.6": {
            "ipid": "6",
            "ip": "192.168.3.6",
            "ipv6": "0",
            "ipr_ips": "",
            "ipr_netmask": "",
            "vpsid": "3587",
            "hostname": "test_userapi"
        },
        "192.168.11.5": {
            "ipid": "7",
            "ip": "192.168.11.5",
            "ipv6": "0",
            "ipr_ips": "",
            "ipr_netmask": "",
            "vpsid": "3587",
            "hostname": "test_userapi"
        }
    },
    "rdns_records": {
        "15": {
            "id": "15",
            "domain_id": "1",
            "name": "165.35.189.107.in-addr.arpa",
            "type": "PTR",
            "content": "test123.com",
            "ttl": "86400",
            "prio": "0",
            "change_date": "1476446323",
            "ip": "107.189.35.165"
        }
    },
    "time_taken": "0.082"
}
{
    "uid": "5",
    "act": "rdns",
    "timezone": 1,
    "timenow": "October 17, 2016, 1:05 pm",
    "vpsid": "3587",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "",
        "lname": "",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "1"
    },
    "pdns": {
        "pdnsid": "1"
    },
    "support_link": "http:\/\/softaculous.com",
    "disable_login_logo": 1,
    "title": "Add Reverse DNS",
    "done": {
        "msg": "The rDNS record has been deleted",
        "goto": "act=rdns"
    },
    "deleted": 1,
    "allowed_ip": {
        "107.189.35.165": {
            "ipid": "210417",
            "ip": "107.189.35.165",
            "ipv6": "0",
            "ipr_ips": "",
            "ipr_netmask": "",
            "vpsid": "3587",
            "hostname": "test_userapi"
        },
        "192.168.3.6": {
            "ipid": "6",
            "ip": "192.168.3.6",
            "ipv6": "0",
            "ipr_ips": "",
            "ipr_netmask": "",
            "vpsid": "3587",
            "hostname": "test_userapi"
        },
        "192.168.11.5": {
            "ipid": "7",
            "ip": "192.168.11.5",
            "ipv6": "0",
            "ipr_ips": "",
            "ipr_netmask": "",
            "vpsid": "3587",
            "hostname": "test_userapi"
        }
    },
    "rdns_records": {
        "15": {
            "id": "15",
            "domain_id": "1",
            "name": "165.35.189.107.in-addr.arpa",
            "type": "PTR",
            "content": "test123.com",
            "ttl": "86400",
            "prio": "0",
            "change_date": "1476446323",
            "ip": "107.189.35.165"
        }
    },
    "time_taken": "0.082"
}

HTTP Request

https://hostname:4083/index.php?act=rdns&delete=delrdns

Parameters

Name Type Value Description Required
act GET rdns The action will delete the rdns record Yes
delete POST delrdns The rdns entry to be deleted Yes

Change Hostname

curl -k -X POST -d "changehost=1&newhost=test_api" 
-L "https://hostname:4083/index.php?act=hostname&svs=3577&api=json& 
apikey=your_api_key&apipass=your_api_pass&do=1"
<?php
    require_once('enduser.php');

    $key =  '';
    $pass = '';
    $ip = '';
    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);

    $post = array();
    $hostname = 'Test-hostname12';
    $vid = 3384;
    $output = $admin->hostname($vid, $hostname);

    print_r(json_encode($output));
?>

Result: The above code will produce the following output

{
    "uid": "321",
    "act": "hostname",
    "timezone": 1,
    "timenow": "September 23, 2016, 6:04 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Hostname",
    "done": {
        "msg": "Your hostname will be changed when the VPS is booted again"
    },
    "onboot": "Your hostname will be changed when the VPS is booted again",
    "current": "OpenVZSlave2_dnd",
    "time_taken": "1.365"
}
{
    "uid": "321",
    "act": "hostname",
    "timezone": 1,
    "timenow": "September 23, 2016, 6:04 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Hostname",
    "done": {
        "msg": "Your hostname will be changed when the VPS is booted again"
    },
    "onboot": "Your hostname will be changed when the VPS is booted again",
    "current": "OpenVZSlave2_dnd",
    "time_taken": "1.365"
}

HTTP Request

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

Parameters

Name Type Value Description Required
act GET Int The action specified to return data Yes
svs POST Int The vpsid whose hostname needs to be changed Yes
newhost POST newhost The new hostname of the vps Yes

Change Password

curl -k -X POST -d "changepass=1&newpass=test@123&conf=test@123" 
-L "https://hostname:4083/index.php?act=changepassword&svs=3577&api=json&
apikey=your_api_key&apipass=your_api_pass&do=1"
<?php
    require_once('enduser.php');

    $key =  '';
    $pass = '';
    $ip = '';
    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);

    $vid = 3384;

    $newpass = 'Test123';

    $output = $admin->changepassword($vid, $newpass);

    print_r(json_encode($output));
?>

Result: The above code will produce the following output

{
    "uid": "321",
    "act": "changepassword",
    "timezone": 1,
    "timenow": "September 23, 2016, 6:20 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Change Password",
    "done": {
        "msg": "Your password will be changed when the VPS is booted again"
    },
    "onboot": "Your password will be changed when the VPS is booted again",
    "time_taken": "1.327"
}
{
    "uid": "321",
    "act": "changepassword",
    "timezone": 1,
    "timenow": "September 23, 2016, 6:20 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Change Password",
    "done": {
        "msg": "Your password will be changed when the VPS is booted again"
    },
    "onboot": "Your password will be changed when the VPS is booted again",
    "time_taken": "1.327"
}

HTTP Request

https:hostname:4083/index.php?act=changepassword&svs=vpsid

Parameters

Name Type Value Description Required
act GET changepassword The action specified to return data Yes
svs POST Int The vpsid whose password needs to be changed Yes
newpass POST newpass The new password of the vps Yes
conf POST conf Confirmation to change the password Yes

VPS Configuration

curl -k -X POST -d "hvmsettings=1&acpi=1&apic=1&vnc=0&tuntap_enable=0& 
ppp_enable=1&boot=dc&kvm_vga=1&nic_type=e1000&hvm_vnc_keymap=en-us" 
-L "https://hostname:4083/index.php?act=hvmsettings&svs=3577&api=json& 
apikey=your_api_key&apipass=your_api_pass&do=1"
<?php
    require_once('enduser.php');

    $key =  '';
    $pass = '';
    $ip = '';
    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);

    $post = array();
    $post['hvmsettings'] = 1;
    $post['acpi'] = 1;
    $post['apic'] = 1;
    $post['vnc'] = 0;
    $post['tuntap_enable'] = 1;
    $post['ppp_enable'] = 0;
    $post['boot'] = 'cd';
    $post['kvm_vga'] = 1;
    $post['acceleration'] = 1;
    $post['nic_type'] = 'e1000';
    $post['hvm_vnc_keymap'] = 'en-us';
    $vid = 3384;

    $output = $admin->hvmsettings($vid, $post);

    print_r(json_encode($output));
?>

Result: The above code will produce the following output

{
    "uid": "321",
    "act": "hvmsettings",
    "timezone": 1,
    "timenow": "September 23, 2016, 6:41 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "HVM Settings",
    "done": {
        "msg": "The settings have been save successfully"
    },
    "boot": {
        "d": "CD Drive",
        "c": "Hard Disk"
    },
    "vnckeymaps": ["en-us", "de-ch", "ar", "da", "et", "fo", "fr-be", "fr-ch", "hu", "it", "lt", "mk", "nl", "no", "pt", "ru", "sv", "tr", "de", "en-gb", "es", "fi", "fr", "fr-ca", "hr", "is", "ja", "lv", "nl-be", "pl", "pt-br", "sl", "th"],
    "nictypes": {
        "default": "Realtek 8139(default)",
        "virtio": "Virtio",
        "e1000": "Intel E1000",
        "ne2k_pci": "Novell NE2000",
        "i82559er": "Intel i82559er",
        "pcnet": "AMD PCNET",
        "ne2k_isa": "Novell E2000 ISA"
    },
    "isos": {
        "debian-8.0.0-amd64-netinst.iso": {
            "iso": "debian-8.0.0-amd64-netinst.iso",
            "mg": [17],
            "name": "debian-8.0.0-amd64-netinst.iso",
            "filename": "debian-8.0.0-amd64-netinst.iso",
            "size": 257949696,
            "distro": "debian"
        },
        "CentOS-6.8-x86_64-minimal.iso": {
            "iso": "CentOS-6.8-x86_64-minimal.iso",
            "mg": null,
            "name": "CentOS-6.8-x86_64-minimal.iso",
            "filename": "CentOS-6.8-x86_64-minimal.iso",
            "size": 468713472,
            "distro": "centos"
        },
        "CentOS-7-x86_64-Minimal-1511.iso": {
            "iso": "CentOS-7-x86_64-Minimal-1511.iso",
            "mg": null,
            "name": "CentOS-7-x86_64-Minimal-1511.iso",
            "filename": "CentOS-7-x86_64-Minimal-1511.iso",
            "size": 632291328,
            "distro": "centos"
        },
    },
    "oslist": null,
    "vps": {
        "vpsid": "3008",
        "vps_name": "v1846",
        "uuid": "5irewd0nb2jnmdyh",
        "serid": "1",
        "time": "1465779583",
        "edittime": "1473922007",
        "virt": "kvm",
        "uid": "321",
        "plid": "0",
        "hostname": "test_api",
        "osid": "347",
        "os_name": "centos-6.6-x86_64",
        "iso": "",
        "sec_iso": "",
        "boot": "dca",
        "space": "30",
        "inodes": "0",
        "ram": "2048",
        "burst": "0",
        "swap": "2048",
        "cpu": "2048",
        "cores": "8",
        "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": "5903",
        "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": "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": "7.56",
        "webuzo": "0",
        "disable_ebtables": "1",
        "admin_managed": "0",
        "rdp": "0",
        "topology_sockets": "0",
        "topology_cores": "0",
        "topology_threads": "0",
        "mac": "",
        "notes": null,
        "disable_nw_config": "0",
        "pid": "0"
    },
    "virt": "kvm",
    "flags": {
        "enable_tuntap_cp": 0,
        "enable_ppp_cp": 1,
        "enable_enduser_vnc": 1,
        "enable_nic": 1
    },
    "time_taken": "1.427"
}
{
    "uid": "321",
    "act": "hvmsettings",
    "timezone": 1,
    "timenow": "September 23, 2016, 6:41 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "HVM Settings",
    "done": {
        "msg": "The settings have been save successfully"
    },
    "boot": {
        "d": "CD Drive",
        "c": "Hard Disk"
    },
    "vnckeymaps": ["en-us", "de-ch", "ar", "da", "et", "fo", "fr-be", "fr-ch", "hu", "it", "lt", "mk", "nl", "no", "pt", "ru", "sv", "tr", "de", "en-gb", "es", "fi", "fr", "fr-ca", "hr", "is", "ja", "lv", "nl-be", "pl", "pt-br", "sl", "th"],
    "nictypes": {
        "default": "Realtek 8139(default)",
        "virtio": "Virtio",
        "e1000": "Intel E1000",
        "ne2k_pci": "Novell NE2000",
        "i82559er": "Intel i82559er",
        "pcnet": "AMD PCNET",
        "ne2k_isa": "Novell E2000 ISA"
    },
    "isos": {
        "debian-8.0.0-amd64-netinst.iso": {
            "iso": "debian-8.0.0-amd64-netinst.iso",
            "mg": [17],
            "name": "debian-8.0.0-amd64-netinst.iso",
            "filename": "debian-8.0.0-amd64-netinst.iso",
            "size": 257949696,
            "distro": "debian"
        },  
        "CentOS-6.8-x86_64-minimal.iso": {
            "iso": "CentOS-6.8-x86_64-minimal.iso",
            "mg": null,
            "name": "CentOS-6.8-x86_64-minimal.iso",
            "filename": "CentOS-6.8-x86_64-minimal.iso",
            "size": 468713472,
            "distro": "centos"
        },
        "CentOS-7-x86_64-Minimal-1511.iso": {
            "iso": "CentOS-7-x86_64-Minimal-1511.iso",
            "mg": null,
            "name": "CentOS-7-x86_64-Minimal-1511.iso",
            "filename": "CentOS-7-x86_64-Minimal-1511.iso",
            "size": 632291328,
            "distro": "centos"
        },
    },
    "oslist": null,
    "vps": {
        "vpsid": "3008",
        "vps_name": "v1846",
        "uuid": "5irewd0nb2jnmdyh",
        "serid": "1",
        "time": "1465779583",
        "edittime": "1473922007",
        "virt": "kvm",
        "uid": "321",
        "plid": "0",
        "hostname": "test_api",
        "osid": "347",
        "os_name": "centos-6.6-x86_64",
        "iso": "",
        "sec_iso": "",
        "boot": "dca",
        "space": "30",
        "inodes": "0",
        "ram": "2048",
        "burst": "0",
        "swap": "2048",
        "cpu": "2048",
        "cores": "8",
        "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": "5903",
        "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": "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": "7.56",
        "webuzo": "0",
        "disable_ebtables": "1",
        "admin_managed": "0",
        "rdp": "0",
        "topology_sockets": "0",
        "topology_cores": "0",
        "topology_threads": "0",
        "mac": "",
        "notes": null,
        "disable_nw_config": "0",
        "pid": "0"
    },
    "virt": "kvm",
    "flags": {
        "enable_tuntap_cp": 0,
        "enable_ppp_cp": 1,
        "enable_enduser_vnc": 1,
        "enable_nic": 1
    },
    "time_taken": "1.427"
}

HTTP Request

https://hostname:4083/index.php?act=hvmsettings&svs=vid

Parameters

Name Type Value Description Required
act GET hvmsettings The action specified to return data Yes
svs POST Int The vpsid whose settings will be changed. This is passed in URL Yes
vid POST Int The vpsid whose configuration has to be set.This is passed as a POST parameter Yes
acceleration POST acceleration If enabled 2D & 3D acceleration will be enabled No
boot POST boot Sets the boot order in the vps boot values not specified eg: cda or dca Yes
hvm_vnc_keymap POST hvm_vnc_keymap If vnc is set then this will set vnc Keymap No
hvmsettings POST 1 IF set, the hvm settings will be saved successfully Yes
isos POST isos This will save name of the iso from a given list No
nictype POST nictype This will select Network Interface card Yes
sec_iso POST sec_iso This will set the secondary iso No
enable_ppp_cp POST 1 0 Enables Point to Point Protocol.(For OpenVZ)
enable_tuntap_cp POST 1 0 Enables TunTap.(For OpenVZ)

Values for VNC keymap

en-us hu sv hr
de-ch it tr is
ar lt de ja
da mk en-gb lv
et nl es nl-be
fo no fi pl
fr-be pt fr pt-br
fr-ch ru fr-ca sl
th

Rescue

Enable Rescue

 curl -k -X POST -d "enablerescue=1&password=Test_rescue& 
conf_password=Test_rescue" 
-L "https://hostname:4083/index.php?act=rescue&svs=3577&api=json& 
apikey=your_api_key&apipass=your_api_pass&do=1"
<?php
    require_once('enduser.php');

    $key =  '';
    $pass = '';
    $ip = '';
    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);

    $vid = 3384;
    $pass = 'testrescue';

    $output = $admin->rescue($vid, $pass);

    print_r(json_encode($output));
?>

Result: The above code will produce the following output

{
    "uid": "321",
    "act": "rescue",
    "timezone": 1,
    "timenow": "September 23, 2016, 7:07 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Rescue Mode",
    "done": {
        "msg": "Rescue mode has been enabled successfully"
    },
    "status": null,
    "rescue_enabled": true,
    "output": null,
    "cant_rescue": null,
    "time_taken": "118.6"
}
{
    "uid": "321",
    "act": "rescue",
    "timezone": 1,
    "timenow": "September 23, 2016, 7:07 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Rescue Mode",
    "done": {
        "msg": "Rescue mode has been enabled successfully"
    },
    "status": null,
    "rescue_enabled": true,
    "output": null,
    "cant_rescue": null,
    "time_taken": "118.6"
}

HTTP Request

https://hostname:4083/index.php?act=rescue&svs=vpsid

Parameters

Name Type Value Description Required
act GET rescue The action specified to return the data Yes
vid POST Int The vpsid whose rescue mode has to be activated. This is passed to the URL Yes
password POST pass The password to be set while activating rescue mode Yes
conf_password POST confpass The confirmation for password Yes
enablerescue POST 1 If set, the rescue mode will be activated inside the vps Yes
svs POST Int The vpsid whose rescue has to be activated. This will be passed along with the URL Yes

Disable Rescue

curl -k -X POST -d "disablerescue=1" -L 
"https://hostname:4083/index.php?act=rescue&svs=3609& 
api=json&apikey=your_api_key&apipass=your_api_pass"

Result:Output produced when rescue is disabled

{
    "uid": "321",
    "act": "rescue",
    "timezone": 1,
    "timenow": "September 23, 2016, 7:09 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Rescue Mode",
    "done": {
        "msg": "Rescue mode has been disabled successfully"
    },
    "status": null,
    "rescue_enabled": false,
    "output": null,
    "cant_rescue": null,
    "time_taken": "16.53"
}
{
    "uid": "321",
    "act": "rescue",
    "timezone": 1,
    "timenow": "September 23, 2016, 7:09 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Rescue Mode",
    "done": {
        "msg": "Rescue mode has been disabled successfully"
    },
    "status": null,
    "rescue_enabled": false,
    "output": null,
    "cant_rescue": null,
    "time_taken": "16.53"
}

HTTP Request

https://hostname:4083/index.php?act=rescue&vpsid=svs

Parameters

Name Type Value Description Required
act GET rescue The action specified to return the data Yes
svs POST Int The vpsid whose rescue has to be activated. This will be passed to the URL Yes
vid POST Int The vpsid whose rescue mode has to be activated.This will be passed as a POST Parameter Yes
disablerescue POST 1 If set, the rescue mode will be de-activated inside the vps Yes

VNC Password

curl -k -X POST -d "vncpass=1&newpass=testawc&conf=testawc" 
-L "https://hostname:4083/index.php?act=vncpass&svs=3577&api=json& 
apikey=your_api_key&apipass=your_api_pass&do=1"
<?php
    require_once('enduser.php');

    $key =  '';
    $pass = '';
    $ip = '';
    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);

    $vid = 3384;
    $pass = 'tesfher';

    $output = $admin->vncpass($vid, $pass);

    print_r(json_encode($output));
?>

Result: The above code produces the following output

{
    "uid": "321",
    "act": "vncpass",
    "timezone": 1,
    "timenow": "September 23, 2016, 6:58 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Change VNC Password",
    "done": {
        "msg": "Your VNC Password has been changed successfully."
    },
    "time_taken": "0.259"
}
{
    "uid": "321",
    "act": "vncpass",
    "timezone": 1,
    "timenow": "September 23, 2016, 6:58 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Change VNC Password",
    "done": {
        "msg": "Your VNC Password has been changed successfully."
    },
    "time_taken": "0.259"
}

HTTP Request

https://hostname:4083/index.php?act=vncpass&svs=vid

parameters">Parameters
Name Type Value Description Required
act GET vncpass The action specified to return data. ** (FOR KVM)** Yes
svs POST Int The vps whose vnc password needs to be changed. This will be passed to the url Yes
vid POST Int The vpsid whose VNC password needs to be changed. This will be passed as a POST parameter Yes
vncpass POST vncpass The new password that needs to be changed Yes
conf POST conf Confirming the entered password Yes

Recipes

List Recipes

curl -k -X GET -L "https://hostname:4083/index.php?act=listrecipes& 
svs=3577&api=json&apikey=your_api_key& 
apipass=your_api_pass&do=1"
<?php
    require_once('enduser.php');

    $key =  '';
    $pass = '';
    $ip = '';
    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);

    $output = $admin->listrecipes();

    print_r(json_encode($output));
?>

Result:The above code will produce the following output

{
    "uid": "321",
    "act": "listrecipes",
    "timezone": 1,
    "timenow": "September 23, 2016, 7:11 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Virtualizor",
    "recipes": {
        "19": {
            "rid": "19",
            "name": "test recipe",
            "code": "#!/bin/shnecho "This is your test recipe" > test.txt",
            "desc": "This is the description for test recipe",
            "logo": "",
            "status": "1"
        }
    },
    "page": {
        "start": 0,
        "len": 50,
        "maxNum": "6"
    },
    "time_taken": "0.100"
}
{
    "uid": "321",
    "act": "listrecipes",
    "timezone": 1,
    "timenow": "September 23, 2016, 7:11 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Virtualizor",
    "recipes": {
        "9": {
            "rid": "9",
            "name": "test287",
            "code": "#!/bin/shnntouch /newtest",
            "desc": "Just testing yar",
            "logo": "",
            "status": "1"
        },
        "13": {
            "rid": "13",
            "name": "test",
            "code": "#!/bin/shnecho "Europe/Budapest" > /etc/localtime",
            "desc": "",
            "logo": "",
            "status": "1"
        },
        "16": {
            "rid": "16",
            "name": "test279",
            "code": "#!/bin/shnecho "recepi" > /test.txt",
            "desc": "Just testing yarrn<a>softaculous.com</a>",
            "logo": "https://hostname:4083/sessbpxbng7dzqjuykqr/themes/default/images/loginlogo.gif",
            "status": "1"
        },
        "17": {
            "rid": "17",
            "name": "Recipe01",
            "code": "#!/bin/shnecho `date` >> /root/test1.txtn",
            "desc": "",
            "logo": "",
            "status": "1"
        },
        "18": {
            "rid": "18",
            "name": "WinRecipe1",
            "code": "#!/bin/shnecho date c:test1.txt",
            "desc": "",
            "logo": "",
            "status": "1"
        },
        "19": {
            "rid": "19",
            "name": "test recipe",
            "code": "#!/bin/shnThis is your test recipe",
            "desc": "This is the description for test recipe",
            "logo": "",
            "status": "1"
        }
    },
    "page": {
        "start": 0,
        "len": 50,
        "maxNum": "6"
    },
    "time_taken": "0.100"
}

HTTP Reqeust

https://hostname:4083/index.php?act=listrecipes&svs=vpsid

Parameters

Name Type Value Description Required
vid POST Int The vpsid whose recipes need to be listed. This will be passed as a POST Parameter Yes
svs POST Int The vps whose recipes needs to be listed. This will be passed to the URL Yes
act GET listrecipes The action specified is used to retrieve data Yes

Execute Recipe

curl -k -X POST -d "exec_rid=9&exec_recipe=1" -L "
https://hostname:4083/index.php?act=listrecipes& 
svs=3609&rid=9&api=json&apikey=you-api_key& 
apipass=your_api_key"
<?php
    require_once('enduser.php');

    $key =  '';
    $pass = '';
    $ip = '';
    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);

    $vid = 3609
    $rid = 9

    $output = $admin->listrecipes($vid,$rid);

    print_r(json_encode($output));
?>

>Result:After recipe is executed

```php
{
    "uid": "321",
    "act": "listrecipes",
    "timezone": 1,
    "timenow": "September 23, 2016, 7:20 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Virtualizor",
    "done": {
        "msg": "Recipe will be cooked when you reboot the VPS"
    },
    "onboot": "Recipe will be cooked when you reboot the VPS",
    "recipes": {
        "9": {
            "rid": "9",
            "name": "test287",
            "code": "#!/bin/shnntouch /newtest",
            "desc": "Just testing yar",
            "logo": "",
            "status": "1"
        },
        "13": {
            "rid": "13",
            "name": "test",
            "code": "#!/bin/shnecho "Europe/Budapest" > /etc/localtime",
            "desc": "",
            "logo": "",
            "status": "1"
        },
        "16": {
            "rid": "16",
            "name": "test279",
            "code": "#!/bin/shnecho "recepi" > /test.txt",
            "desc": "Just testing yarrn<a>softaculous.com</a>",
            "logo": "https://hostname:4083/sessbpxbng7dzqjuykqr/themes/default/images/loginlogo.gif",
            "status": "1"
        },
        "17": {
            "rid": "17",
            "name": "Recipe01",
            "code": "#!/bin/shnecho `date` >> /root/test1.txtn",
            "desc": "",
            "logo": "",
            "status": "1"
        },
        "18": {
            "rid": "18",
            "name": "WinRecipe1",
            "code": "#!/bin/shnecho date c:test1.txt",
            "desc": "",
            "logo": "",
            "status": "1"
        },
        "19": {
            "rid": "19",
            "name": "test recipe",
            "code": "#!/bin/shnThis is your test recipe",
            "desc": "This is the description for test recipe",
            "logo": "",
            "status": "1"
        }
    },
    "page": {
        "start": 0,
        "len": 50,
        "maxNum": "6"
    },
    "time_taken": "0.551"
}
{
    "uid": "321",
    "act": "listrecipes",
    "timezone": 1,
    "timenow": "September 23, 2016, 7:20 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Virtualizor",
    "done": {
        "msg": "Recipe will be cooked when you reboot the VPS"
    },
    "onboot": "Recipe will be cooked when you reboot the VPS",
    "recipes": {
        "9": {
            "rid": "9",
            "name": "test287",
            "code": "#!/bin/shnntouch /newtest",
            "desc": "Just testing yar",
            "logo": "",
            "status": "1"
        },
        "13": {
            "rid": "13",
            "name": "test",
            "code": "#!/bin/shnecho "Europe/Budapest" > /etc/localtime",
            "desc": "",
            "logo": "",
            "status": "1"
        },
        "16": {
            "rid": "16",
            "name": "test279",
            "code": "#!/bin/shnecho "recepi" > /test.txt",
            "desc": "Just testing yarrn<a>softaculous.com</a>",
            "logo": "https://hostname:4083/sessbpxbng7dzqjuykqr/themes/default/images/loginlogo.gif",
            "status": "1"
        },
        "17": {
            "rid": "17",
            "name": "Recipe01",
            "code": "#!/bin/shnecho `date` >> /root/test1.txtn",
            "desc": "",
            "logo": "",
            "status": "1"
        },
        "18": {
            "rid": "18",
            "name": "WinRecipe1",
            "code": "#!/bin/shnecho date c:test1.txt",
            "desc": "",
            "logo": "",
            "status": "1"
        },
        "19": {
            "rid": "19",
            "name": "test recipe",
            "code": "#!/bin/shnThis is your test recipe",
            "desc": "This is the description for test recipe",
            "logo": "",
            "status": "1"
        }
    },
    "page": {
        "start": 0,
        "len": 50,
        "maxNum": "6"
    },
    "time_taken": "0.551"
}

HTTP Request

https://hostname:4083/index.php?act=listrecipes&svs=vpsid&rid=rid

Parameters

Name Type Value Description Required
act GET listrecipes The action specified is used to retrieve data Yes
vid POST Int The vpsid whose recipe needs to be executed. This will be passed as a POST parameter Yes
svs POST Int The vps whose recipes needs to be listed. This is passed to the URL Yes
exec_recipe POST 1 If set, then the specified recipe will be executed Yes
exec_rid POST rid The id of the recipe that needs to be executed Yes

Monitor

curl -k -X GET -L "https://hostname:4083/index.php?act=monitor&svs=3577& 
api=json&apikey=your_api_key&apipass=your_api_pass&do=1"
<?php
    require_once('enduser.php');

    $key =  '';
    $pass = '';
    $ip = '';
    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);

    $output = $admin->monitor();

    print_r(json_encode($output));
?>

Result: The above code will produce the following output

{
    "uid": "321",
    "act": "monitor",
    "timezone": 1,
    "timenow": "September 23, 2016, 7:29 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "CPU information",
    "cpu": {
        "cpu": {
            "manu": "intel",
            "limit": 2500.09,
            "used": 17.5,
            "free": 2482.59,
            "percent": 0.7,
            "percent_free": 99.3
        }
    },
    "disk": {
        "disk": {
            "limit": 30720,
            "used": 636.59,
            "limit_gb": 30,
            "used_gb": 0.62,
            "free": 30083.41,
            "free_gb": 29.38,
            "percent": 2.07,
            "percent_free": 97.93
        },
        "inodes": {
            "limit": 49056,
            "used": 21298,
            "free": 27758,
            "percent": 43.42,
            "percent_free": 56.58
        }
    },
    "ram": {
        "used": 0,
        "limit": 2048,
        "guaranteed": 2048,
        "swap": 2048,
        "free": 2048,
        "percent": 0,
        "percent_free": 100
    },
    "virt": "kvm",
    "monthly_data": [
        ["3008", "1474611842", "1", "637", "21298", "0", "1.80", "0", "0"],
        ["3008", "1474611362", "1", "3252", "64813", "0", "0.70", "60", "0"],
        ["3008", "1474610884", "0", "3252", "64813", "0", "0.00", "0", "0"],
        ["3008", "1474610402", "1", "3252", "64813", "0", "1.40", "60", "0"],
        ["3008", "1474610161", "1", "3252", "64813", "0", "0.90", "6027", "1703"],
        ["3008", "1474609682", "1", "3252", "64813", "0", "0.50", "60", "0"],
        ["3008", "1474609202", "1", "3252", "64813", "0", "0.90", "0", "0"],
        ["3008", "1474608722", "1", "3252", "64813", "0", "2.00", "5793", "902"],
        ["3008", "1474608242", "1", "3252", "64813", "0", "1.10", "5873", "1551"],
        ["3008", "1474607761", "1", "3252", "64813", "0", "1.20", "6184", "1703"],
        ["3008", "1474607281", "1", "3252", "64813", "0", "2.30", "0", "0"],
        ["3008", "1474606802", "1", "3252", "64813", "0", "0.50", "0", "0"],
        ["3008", "1474606562", "1", "3252", "64813", "0", "1.40", "5967", "1703"],
        ["3008", "1474606081", "1", "3252", "64813", "0", "0.70", "60", "0"],
        ["3008", "1474605601", "1", "3252", "64813", "0", "2.10", "0", "0"],
        ["3008", "1474605122", "1", "3252", "64813", "0", "0.70", "0", "0"],
        ["3008", "1474604642", "1", "3252", "64813", "0", "2.00", "60", "0"],
        ["3008", "1474604162", "1", "3252", "64813", "0", "1.80", "729", "446"],
        ["3008", "1474603682", "1", "3252", "64813", "0", "0.90", "120", "0"],
        ["3008", "1474603202", "1", "3252", "64813", "0", "1.80", "60", "0"],
        ["3008", "1474006082", "1", "5119", "110387", "0", "9.10", "120", "54"]
    ],
    "month": {
        "current_month": "201609",
        "prev_month": "201608",
        "next_month": "201610"
    },
    "time_taken": "1.330"
}
{
    "uid": "321",
    "act": "monitor",
    "timezone": 1,
    "timenow": "September 23, 2016, 7:29 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "CPU information",
    "cpu": {
        "cpu": {
            "manu": "intel",
            "limit": 2500.09,
            "used": 17.5,
            "free": 2482.59,
            "percent": 0.7,
            "percent_free": 99.3
        }
    },
    "disk": {
        "disk": {
            "limit": 30720,
            "used": 636.59,
            "limit_gb": 30,
            "used_gb": 0.62,
            "free": 30083.41,
            "free_gb": 29.38,
            "percent": 2.07,
            "percent_free": 97.93
        },
        "inodes": {
            "limit": 49056,
            "used": 21298,
            "free": 27758,
            "percent": 43.42,
            "percent_free": 56.58
        }
    },
    "ram": {
        "used": 0,
        "limit": 2048,
        "guaranteed": 2048,
        "swap": 2048,
        "free": 2048,
        "percent": 0,
        "percent_free": 100
    },
    "virt": "kvm",
    "monthly_data": [
        ["3008", "1474611842", "1", "637", "21298", "0", "1.80", "0", "0"],
        ["3008", "1474611362", "1", "3252", "64813", "0", "0.70", "60", "0"],
        ["3008", "1474610884", "0", "3252", "64813", "0", "0.00", "0", "0"],
        ["3008", "1474610402", "1", "3252", "64813", "0", "1.40", "60", "0"],
        ["3008", "1474610161", "1", "3252", "64813", "0", "0.90", "6027", "1703"],
        ["3008", "1474609682", "1", "3252", "64813", "0", "0.50", "60", "0"],
        ["3008", "1474609202", "1", "3252", "64813", "0", "0.90", "0", "0"],
        ["3008", "1474608722", "1", "3252", "64813", "0", "2.00", "5793", "902"],
        ["3008", "1474608242", "1", "3252", "64813", "0", "1.10", "5873", "1551"],
        ["3008", "1474607761", "1", "3252", "64813", "0", "1.20", "6184", "1703"],
        ["3008", "1474607281", "1", "3252", "64813", "0", "2.30", "0", "0"],
        ["3008", "1474606802", "1", "3252", "64813", "0", "0.50", "0", "0"],
        ["3008", "1474606562", "1", "3252", "64813", "0", "1.40", "5967", "1703"],
        ["3008", "1474606081", "1", "3252", "64813", "0", "0.70", "60", "0"],
        ["3008", "1474605601", "1", "3252", "64813", "0", "2.10", "0", "0"],
        ["3008", "1474605122", "1", "3252", "64813", "0", "0.70", "0", "0"],
        ["3008", "1474604642", "1", "3252", "64813", "0", "2.00", "60", "0"],
        ["3008", "1474604162", "1", "3252", "64813", "0", "1.80", "729", "446"],
        ["3008", "1474603682", "1", "3252", "64813", "0", "0.90", "120", "0"],
        ["3008", "1474603202", "1", "3252", "64813", "0", "1.80", "60", "0"],
        ["3008", "1474006082", "1", "5119", "110387", "0", "9.10", "120", "54"]
    ],
    "month": {
        "current_month": "201609",
        "prev_month": "201608",
        "next_month": "201610"
    },
    "time_taken": "1.330"
}
http-request">HTTP Request

https://hostname:4083/index.php?act=monitor&svs=vpsid

parameters">Parameters
Name Type Value Description Required
act GET monitor The action specified to retrieve data Yes
svs POST Int The vps whose monitoring data needs to be fetched Yes

Status Logs

curl -k -X GET 
-L "https://hostname:4083/index.php?act=statuslogs&svs=3577& 
api=json&apikey=your_api_key&apipass=your_api_pass&do=1"
<?php
    require_once('enduser.php');

    $key =  '';
    $pass = '';
    $ip = '';
    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);

    $vid = 3384;

    $output = $admin->statuslogs($vid);

    print_r(json_encode($output));
?>

Result:The above code produces the following output

{
    "uid": "321",
    "act": "statuslogs",
    "timezone": 1,
    "timenow": "September 23, 2016, 7:31 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Status logs",
    "var": [{
        "vpsid": "3008",
        "time": "1474611842",
        "status": "1",
        "disk": "637",
        "inode": "21298",
        "ram": "0",
        "cpu": "1.80",
        "actual_cpu": "1.80",
        "net_in": "0",
        "net_out": "0"
    }, {
        "vpsid": "3008",
        "time": "1474611362",
        "status": "1",
        "disk": "3252",
        "inode": "64813",
        "ram": "0",
        "cpu": "0.70",
        "actual_cpu": "0.70",
        "net_in": "60",
        "net_out": "0"
    }, {
        "vpsid": "3008",
        "time": "1474610884",
        "status": "0",
        "disk": "3252",
        "inode": "64813",
        "ram": "0",
        "cpu": "0.00",
        "actual_cpu": "0.00",
        "net_in": "0",
        "net_out": "0"
    }, {
        "vpsid": "3008",
        "time": "1474610402",
        "status": "1",
        "disk": "3252",
        "inode": "64813",
        "ram": "0",
        "cpu": "1.40",
        "actual_cpu": "1.40",
        "net_in": "60",
        "net_out": "0"
    }],
    "num_res": "1199",
    "time_taken": "0.900"
}
{
    "uid": "321",
    "act": "statuslogs",
    "timezone": 1,
    "timenow": "September 23, 2016, 7:31 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Status logs",
    "var": [{
        "vpsid": "3008",
        "time": "1474611842",
        "status": "1",
        "disk": "637",
        "inode": "21298",
        "ram": "0",
        "cpu": "1.80",
        "actual_cpu": "1.80",
        "net_in": "0",
        "net_out": "0"
    }, {
        "vpsid": "3008",
        "time": "1474611362",
        "status": "1",
        "disk": "3252",
        "inode": "64813",
        "ram": "0",
        "cpu": "0.70",
        "actual_cpu": "0.70",
        "net_in": "60",
        "net_out": "0"
    }, {
        "vpsid": "3008",
        "time": "1474610884",
        "status": "0",
        "disk": "3252",
        "inode": "64813",
        "ram": "0",
        "cpu": "0.00",
        "actual_cpu": "0.00",
        "net_in": "0",
        "net_out": "0"
    }, {
        "vpsid": "3008",
        "time": "1474610402",
        "status": "1",
        "disk": "3252",
        "inode": "64813",
        "ram": "0",
        "cpu": "1.40",
        "actual_cpu": "1.40",
        "net_in": "60",
        "net_out": "0"
    }],
    "num_res": "1199",
    "time_taken": "0.900"
}

HTTP Request

https://hostname:4083/index.php?act=statuslogs&svs=vpsid

Parameters

Name Type Value Description Required
act GET statuslogs The action specified to retrieve data Yes
svs POST Int The vps whose statuslogs have to be retrieved. This is passed to the URL Yes
vid POST Int The vpsid of the vps to check the status logs. This is passed as a POST parameter Yes

Logs

curl -k -X GET 
-L "https://hostname:4083/index.php?act=logs&svs=3577&api=json 
&apikey=your_api_key&apipass=your_api_pass&do=1"
<?php
    require_once('enduser.php');

    $key =  '';
    $pass = '';
    $ip = '';
    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);

    $output  = $admin->logs();

    print_r(json_encode($output));
?>

Result:The above code produces the following output

{
    "uid": "321",
    "act": "logs",
    "timezone": 1,
    "timenow": "September 23, 2016, 7:33 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Logs",
    "logs": {
        "19900": {
            "actid": "19900",
            "uid": "321",
            "vpsid": "3008",
            "action": "hvmsettings",
            "data": "",
            "time": "1474609300",
            "status": "1",
            "ip": "your_Server_ip",
            "email": "test@test.com",
            "action_text": "Hvmsettings"
        },
        "19901": {
            "actid": "19901",
            "uid": "321",
            "vpsid": "3008",
            "action": "vncpass",
            "data": "",
            "time": "1474610288",
            "status": "1",
            "ip": "your_Server_ip",
            "email": "test@test.com",
            "action_text": "Vncpass"
        },
        "19902": {
            "actid": "19902",
            "uid": "0",
            "vpsid": "3008",
            "action": "install_recipe",
            "data": "test287",
            "time": "1474611625",
            "status": "1",
            "ip": "your_Server_ip",
            "email": null,
            "action_text": "Install_recipe - test287"
        },
        "19899": {
            "actid": "19899",
            "uid": "321",
            "vpsid": "3008",
            "action": "hostname",
            "data": "test_api",
            "time": "1474607066",
            "status": "1",
            "ip": "your_Server_ip",
            "email": "test@test.com",
            "action_text": "Changed Hostname - test_api"
        }
    },
    "time_taken": "0.105"
}
{
    "uid": "321",
    "act": "logs",
    "timezone": 1,
    "timenow": "September 23, 2016, 7:33 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Logs",
    "logs": {
        "19900": {
            "actid": "19900",
            "uid": "321",
            "vpsid": "3008",
            "action": "hvmsettings",
            "data": "",
            "time": "1474609300",
            "status": "1",
            "ip": "your_Server_ip",
            "email": "test@test.com",
            "action_text": "Hvmsettings"
        },
        "19901": {
            "actid": "19901",
            "uid": "321",
            "vpsid": "3008",
            "action": "vncpass",
            "data": "",
            "time": "1474610288",
            "status": "1",
            "ip": "your_Server_ip",
            "email": "test@test.com",
            "action_text": "Vncpass"
        },
        "19902": {
            "actid": "19902",
            "uid": "0",
            "vpsid": "3008",
            "action": "install_recipe",
            "data": "test287",
            "time": "1474611625",
            "status": "1",
            "ip": "your_Server_ip",
            "email": null,
            "action_text": "Install_recipe - test287"
        },
        "19899": {
            "actid": "19899",
            "uid": "321",
            "vpsid": "3008",
            "action": "hostname",
            "data": "test_api",
            "time": "1474607066",
            "status": "1",
            "ip": "your_Server_ip",
            "email": "test@test.com",
            "action_text": "Changed Hostname - test_api"
        }
    },
    "time_taken": "0.105"
}

HTTP Request

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

Parameters

Name Type Value Description Required
act GET logs The action specified to retrieve data Yes

Self Shutdown

Start Self Shutdown

curl -k -X POST -d "selfshutdown=1&shutdown_action=1& 
shutdown_date=09/26/2016&shutdown_hrs=03&shutdown_min=45" -L 
"https://hostname:4083/index.php?act=self_shutdown&svs=3511&api=json 
&apikey=your_api_key&apipass=your_api_pass&do=1"
<?php
    require_once('enduser.php');

    $key =  '';
    $pass = '';
    $ip = '';
    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);

    $vid = 3384;
    $post = array();
    $post['selfshutdown'] = 1;
    $post['shutdown_action'] = 3;
    $post['shutdown_date'] = '08/29/2016';
    $post['shutdown_hrs'] =  12;
    $post['shutdown_min'] = 36;

    $output = $admin->self_shutdown($vid, $post);

    print_r(json_encode($output));
?>

Result: The above code produces the following output

{
    "uid": "321",
    "act": "self_shutdown",
    "timezone": 0,
    "timenow": "September 25, 2016, 4:36 am",
    "vpsid": 3511,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 0,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Self Shutdown",
    "error": {
        "timesp": "1474778163"
    },
    "self_shutdown": {
        "page": {
            "start": 0,
            "len": 50,
            "maxNum": "1"
        },
        "self_shutdown": {
            "6": {
                "id": "6",
                "vpsid": "3511",
                "time": "09/26/2016 03:45",
                "action": "1",
                "status": null,
                "date": "09/26/2016",
                "hours": "03",
                "minutes": "45"
            }
        }
    },
    "done": {
        "msg": "Action added",
        "done": true
    },
    "time_taken": "0.108"
}
{
    "uid": "321",
    "act": "self_shutdown",
    "timezone": 0,
    "timenow": "September 25, 2016, 4:36 am",
    "vpsid": 3511,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 0,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Self Shutdown",
    "error": {
        "timesp": "1474778163"
    },
    "self_shutdown": {
        "page": {
            "start": 0,
            "len": 50,
            "maxNum": "1"
        },
        "self_shutdown": {
            "6": {
                "id": "6",
                "vpsid": "3511",
                "time": "09/26/2016 03:45",
                "action": "1",
                "status": null,
                "date": "09/26/2016",
                "hours": "03",
                "minutes": "45"
            }
        }
    },
    "done": {
        "msg": "Action added",
        "done": true
    },
    "time_taken": "0.108"
}

HTTP Request

https://hostname:4083/index.php?act=self_shutdown&svs=vpsid

Parameters

Name Type Value Description Required
act GET self_shutdown The action specified to retrieve data Yes
svs POST Int The vps id which is needed to set the shutdown timer Yes
selfshutdown POST 1 IF set, the shutdown time will be saved Yes
shutdown_action POST 0-3 What action has to be carried out(Start/Stop/Restart/Poweroff) Yes
shutdown_date POST mm/dd/yyyy The date when self shtudown action should be carried out Yes
shutdown_hrs POST hh Time in hrs for self shutdown Yes
shutdown_min POST mm Time in mins for self shutdown Yes

Values for shutdown_action have to be specified according to the values given below

Shutdown action Values
Start 0
Stop 1
Restart 2
Power Off 3

Delete Self Shutdown

curl -k -X POST -d "delete_timer=9&selfshutdown=1" -L
"https://hostname:4083/index.php?act=self_shutdown& 
svs=3609&api=json&apikey=your_api_key& 
apipass=your_api_pass"
<?php
    require_once('enduser.php');

    $key =  '';
    $pass = '';
    $ip = '';
    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);

    $vid = 3609;
    $post = array();
    $post['selfshutdown'] = 1;
    $post['delete_timer'] = 10;

    $output = $admin->self_shutdown($vid, $post);

    print_r(json_encode($output));
?>

Result: The output produced when shutdown task is deleted

{
    "uid": "372",
    "act": "self_shutdown",
    "timezone": 1,
    "timenow": "October 9, 2016, 2:20 am",
    "vpsid": 3609,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "Self Shutdown",
    "self_shutdown": {
        "page": {
            "start": 0,
            "len": 50,
            "maxNum": "1"
        },
        "self_shutdown": {
            "11": {
                "id": "11",
                "vpsid": "3609",
                "time": "10/10/2016 12:30",
                "action": "2",
                "status": null,
                "date": "10/10/2016",
                "hours": "12",
                "minutes": "30"
            }
        }
    },
    "done": {
        "msg": "Action deleted",
        "done": true
    },
    "time_taken": "0.084"
}
{
    "uid": "372",
    "act": "self_shutdown",
    "timezone": 1,
    "timenow": "October 9, 2016, 2:20 am",
    "vpsid": 3609,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "Self Shutdown",
    "self_shutdown": {
        "page": {
            "start": 0,
            "len": 50,
            "maxNum": "1"
        },
        "self_shutdown": {
            "11": {
                "id": "11",
                "vpsid": "3609",
                "time": "10/10/2016 12:30",
                "action": "2",
                "status": null,
                "date": "10/10/2016",
                "hours": "12",
                "minutes": "30"
            }
        }
    },
    "done": {
        "msg": "Action deleted",
        "done": true
    },
    "time_taken": "0.084"
}

HTTP Request

https://hostname:4083/index.php?act=self_shutdown&svs=vpsid

Parameters

Name Type Value Description Required
act GET self_shutdown The action will shutdown the vps itself dependind on the timing set Yes
svs POST vpsid The vps which needs to be shutdown Yes
selfshutdown POST 1/0 If set then the vps will be shutdown Yes
delete_timer POST Int The timer which will need to be deleted Yes

Tasks

curl -k -X GET -L "https://hostname:4083/index.php?act=ctasks&svs=3609&api=json&apikey=you_api_key&apipass=your_api_pass"
<?php
    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'your_Server_ip';

    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);
    $post['act'] = "ctasks";
    $post['svs'] = 3609;

    $output = $admin->tasks($post);

    print_r(json_encode($output));

Result : The above code produces the following output

{
    "uid": "372",
    "act": "ctasks",
    "timezone": 1,
    "timenow": "October 9, 2016, 3:37 am",
    "vpsid": "3609",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "Tasks",
    "tasks": {
        "_2407": {
            "actid": "2407",
            "slaveactid": "0",
            "uid": "0",
            "vpsid": "3609",
            "serid": "0",
            "action": "Install Recipe",
            "data": "a:6:{s:3:"rid";s:1:"9";s:4:"name";s:7:"test287";s:4:"code";s:25:"#!/bin/shnntouch /newtest";s:4:"desc";s:16:"Just testing yar";s:4:"logo";s:0:"";s:6:"status";s:1:"1";}",
            "time": "1475972822",
            "status_txt": "Change will occur when the VPS is booted again.",
            "status": "1",
            "progress": "0%",
            "started": "Task not Started",
            "updated": "Task not Updated",
            "ended": "Task not Ended",
            "proc_id": "0",
            "ip": "127.0.0.1",
            "internal": "0",
            "email": "root",
            "server_name": "localhost"
        },
        "_2391": {
            "actid": "2391",
            "slaveactid": "0",
            "uid": "0",
            "vpsid": "3609",
            "serid": "0",
            "action": "VPS Start",
            "data": "b:0;",
            "time": "1475818020",
            "status_txt": "Task Completed",
            "status": "1",
            "progress": "Task Completed",
            "started": "October 7, 2016, 6:27 am",
            "updated": "October 7, 2016, 6:27 am",
            "ended": "October 7, 2016, 6:27 am",
            "proc_id": "0",
            "ip": "",
            "internal": "0",
            "email": "root",
            "server_name": "localhost"
        },
        "_2390": {
            "actid": "2390",
            "slaveactid": "0",
            "uid": "0",
            "vpsid": "3609",
            "serid": "0",
            "action": "Changing Password",
            "time": "1475818019",
            "status_txt": "Completed",
            "status": "1",
            "progress": "Task Completed",
            "started": "October 7, 2016, 7:57 am",
            "updated": "October 7, 2016, 7:57 am",
            "ended": "October 7, 2016, 7:57 am",
            "proc_id": "0",
            "ip": "",
            "internal": "0",
            "email": "root",
            "data": "b:0;",
            "server_name": "localhost"
        },
        "_2389": {
            "actid": "2389",
            "slaveactid": "0",
            "uid": "372",
            "vpsid": "3609",
            "serid": "0",
            "action": "VPS Start",
            "data": "b:0;",
            "time": "1475818011",
            "status_txt": "Task Completed",
            "status": "1",
            "progress": "Task Completed",
            "started": "October 7, 2016, 6:26 am",
            "updated": "October 7, 2016, 6:27 am",
            "ended": "October 7, 2016, 6:27 am",
            "proc_id": "0",
            "ip": "58.146.104.55",
            "internal": "0",
            "email": "test@test.com",
            "server_name": "localhost"
        },
        "_2388": {
            "actid": "2388",
            "slaveactid": "0",
            "uid": "0",
            "vpsid": "3609",
            "serid": "0",
            "action": "Creating VPS",
            "data": "a:10:{s:12:"progress_msg";s:25:"Performing final steps...";s:5:"newvs";a:59:{s:4:"uuid";s:16:"bibk7btcce26eauw";s:4:"plid";i:0;s:8:"hostname";s:12:"test_userapi";s:5:"space";i:10;s:3:"ram";i:1024;s:9:"bandwidth";i:0;s:13:"network_speed";i:0;s:12:"upload_speed";i:-1;s:5:"cores";i:4;s:6:"cpupin";i:-1;s:3:"uid";i:372;s:2:"io";i:0;s:5:"burst";i:0;s:11:"cpu_percent";i:200;s:4:"swap";i:1024;s:4:"acpi";i:1;s:4:"apic";i:1;s:3:"pae";i:1;s:3:"vnc";i:1;s:7:"vncport";i:0;s:6:"shadow";i:0;s:4:"virt";s:3:"kvm";s:3:"hvm";i:0;s:3:"iso";s:0:"";s:4:"boot";s:3:"cda";s:12:"band_suspend";i:1;s:6:"tuntap";i:0;s:3:"ppp";i:0;s:10:"mac_status";i:0;s:17:"osreinstall_limit";i:0;s:2:"mg";a:0:{}s:6:"webuzo";i:0;s:9:"kvm_cache";s:0:"";s:7:"io_mode";s:0:"";s:10:"vnc_keymap";s:0:"";s:6:"virtio";i:0;s:8:"cpu_mode";s:0:"";s:13:"admin_managed";i:0;s:3:"rdp";i:0;s:17:"disable_nw_config";i:0;s:16:"topology_sockets";i:0;s:14:"topology_cores";i:0;s:16:"topology_threads";i:0;s:3:"mac";s:0:"";s:4:"osid";i:347;s:3:"cpu";i:1024;s:7:"sec_iso";s:0:"";s:7:"kvm_vga";i:0;s:12:"acceleration";i:0;s:16:"disable_ebtables";i:0;s:8:"vps_name";s:5:"v2117";s:3:"ubc";s:0:"";s:5:"vpsid";s:4:"3609";s:3:"ips";a:1:{i:0;s:7:"1.1.1.3";}s:4:"ipv6";a:0:{}s:11:"ipv6_subnet";a:0:{}s:7:"ips_int";a:0:{}s:11:"vnc_details";s:19:"199.204.187.90:6288";}s:3:"dns";a:0:{}s:5:"serid";i:0;s:10:"user_email";s:23:"test@test.com";s:9:"user_pass";N;s:7:"noemail";s:0:"";s:13:"add_to_backup";s:0:"";s:13:"control_panel";s:0:"";s:6:"recipe";i:0;}",
            "time": "1475817999",
            "status_txt": "Task Completed",
            "status": "1",
            "progress": "Task Completed",
            "started": "October 7, 2016, 6:26 am",
            "updated": "October 7, 2016, 6:27 am",
            "ended": "October 7, 2016, 6:27 am",
            "proc_id": "0",
            "ip": "127.0.0.1",
            "internal": "0",
            "email": "root",
            "server_name": "localhost"
        }
    },
    "page": {
        "start": "0",
        "len": 50,
        "maxNum": "8"
    },
    "time_taken": "0.098"
}
{
    "uid": "372",
    "act": "ctasks",
    "timezone": 1,
    "timenow": "October 9, 2016, 3:37 am",
    "vpsid": "3609",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "Tasks",
    "tasks": {
        "_2407": {
            "actid": "2407",
            "slaveactid": "0",
            "uid": "0",
            "vpsid": "3609",
            "serid": "0",
            "action": "Install Recipe",
            "data": "a:6:{s:3:"rid";s:1:"9";s:4:"name";s:7:"test287";s:4:"code";s:25:"#!/bin/shnntouch /newtest";s:4:"desc";s:16:"Just testing yar";s:4:"logo";s:0:"";s:6:"status";s:1:"1";}",
            "time": "1475972822",
            "status_txt": "Change will occur when the VPS is booted again.",
            "status": "1",
            "progress": "0%",
            "started": "Task not Started",
            "updated": "Task not Updated",
            "ended": "Task not Ended",
            "proc_id": "0",
            "ip": "127.0.0.1",
            "internal": "0",
            "email": "root",
            "server_name": "localhost"
        },
        "_2391": {
            "actid": "2391",
            "slaveactid": "0",
            "uid": "0",
            "vpsid": "3609",
            "serid": "0",
            "action": "VPS Start",
            "data": "b:0;",
            "time": "1475818020",
            "status_txt": "Task Completed",
            "status": "1",
            "progress": "Task Completed",
            "started": "October 7, 2016, 6:27 am",
            "updated": "October 7, 2016, 6:27 am",
            "ended": "October 7, 2016, 6:27 am",
            "proc_id": "0",
            "ip": "",
            "internal": "0",
            "email": "root",
            "server_name": "localhost"
        },
        "_2390": {
            "actid": "2390",
            "slaveactid": "0",
            "uid": "0",
            "vpsid": "3609",
            "serid": "0",
            "action": "Changing Password",
            "time": "1475818019",
            "status_txt": "Completed",
            "status": "1",
            "progress": "Task Completed",
            "started": "October 7, 2016, 7:57 am",
            "updated": "October 7, 2016, 7:57 am",
            "ended": "October 7, 2016, 7:57 am",
            "proc_id": "0",
            "ip": "",
            "internal": "0",
            "email": "root",
            "data": "b:0;",
            "server_name": "localhost"
        },
        "_2389": {
            "actid": "2389",
            "slaveactid": "0",
            "uid": "372",
            "vpsid": "3609",
            "serid": "0",
            "action": "VPS Start",
            "data": "b:0;",
            "time": "1475818011",
            "status_txt": "Task Completed",
            "status": "1",
            "progress": "Task Completed",
            "started": "October 7, 2016, 6:26 am",
            "updated": "October 7, 2016, 6:27 am",
            "ended": "October 7, 2016, 6:27 am",
            "proc_id": "0",
            "ip": "58.146.104.55",
            "internal": "0",
            "email": "test@test.com",
            "server_name": "localhost"
        },
        "_2388": {
            "actid": "2388",
            "slaveactid": "0",
            "uid": "0",
            "vpsid": "3609",
            "serid": "0",
            "action": "Creating VPS",
            "data": "a:10:{s:12:"progress_msg";s:25:"Performing final steps...";s:5:"newvs";a:59:{s:4:"uuid";s:16:"bibk7btcce26eauw";s:4:"plid";i:0;s:8:"hostname";s:12:"test_userapi";s:5:"space";i:10;s:3:"ram";i:1024;s:9:"bandwidth";i:0;s:13:"network_speed";i:0;s:12:"upload_speed";i:-1;s:5:"cores";i:4;s:6:"cpupin";i:-1;s:3:"uid";i:372;s:2:"io";i:0;s:5:"burst";i:0;s:11:"cpu_percent";i:200;s:4:"swap";i:1024;s:4:"acpi";i:1;s:4:"apic";i:1;s:3:"pae";i:1;s:3:"vnc";i:1;s:7:"vncport";i:0;s:6:"shadow";i:0;s:4:"virt";s:3:"kvm";s:3:"hvm";i:0;s:3:"iso";s:0:"";s:4:"boot";s:3:"cda";s:12:"band_suspend";i:1;s:6:"tuntap";i:0;s:3:"ppp";i:0;s:10:"mac_status";i:0;s:17:"osreinstall_limit";i:0;s:2:"mg";a:0:{}s:6:"webuzo";i:0;s:9:"kvm_cache";s:0:"";s:7:"io_mode";s:0:"";s:10:"vnc_keymap";s:0:"";s:6:"virtio";i:0;s:8:"cpu_mode";s:0:"";s:13:"admin_managed";i:0;s:3:"rdp";i:0;s:17:"disable_nw_config";i:0;s:16:"topology_sockets";i:0;s:14:"topology_cores";i:0;s:16:"topology_threads";i:0;s:3:"mac";s:0:"";s:4:"osid";i:347;s:3:"cpu";i:1024;s:7:"sec_iso";s:0:"";s:7:"kvm_vga";i:0;s:12:"acceleration";i:0;s:16:"disable_ebtables";i:0;s:8:"vps_name";s:5:"v2117";s:3:"ubc";s:0:"";s:5:"vpsid";s:4:"3609";s:3:"ips";a:1:{i:0;s:7:"1.1.1.3";}s:4:"ipv6";a:0:{}s:11:"ipv6_subnet";a:0:{}s:7:"ips_int";a:0:{}s:11:"vnc_details";s:19:"199.204.187.90:6288";}s:3:"dns";a:0:{}s:5:"serid";i:0;s:10:"user_email";s:23:"test@test.com";s:9:"user_pass";N;s:7:"noemail";s:0:"";s:13:"add_to_backup";s:0:"";s:13:"control_panel";s:0:"";s:6:"recipe";i:0;}",
            "time": "1475817999",
            "status_txt": "Task Completed",
            "status": "1",
            "progress": "Task Completed",
            "started": "October 7, 2016, 6:26 am",
            "updated": "October 7, 2016, 6:27 am",
            "ended": "October 7, 2016, 6:27 am",
            "proc_id": "0",
            "ip": "127.0.0.1",
            "internal": "0",
            "email": "root",
            "server_name": "localhost"
        }
    },
    "page": {
        "start": "0",
        "len": 50,
        "maxNum": "8"
    },
    "time_taken": "0.098"
}

HTTP Request

https://hostname:4083/index.php?act=ctasks&svs=vpsid

Parameters

Name Type Value Description Required
act GET ctasks The action will retrieve all data regarding to the particular vps Yes
svs POST vpsid The vps whose tasks needs to be retrieved Yes

OS Reinstall

curl -k -X POST -d "reinsos=1&newos=272&newpass=Test123 
&conf=Test123" -L"https://hostname:4083/index.php?act=ostemplate 
&svs=3609&api=json&apikey=your_api_key&apipass=your_api_pass"
<?php
    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'your_Server_ip';

    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);
    $post['reinsos'] = 1;
    $post['newos'] = '272';
    $post['newpass'] = 'Test123';
    $post['conf'] = 'Test123';
    $vid = 3096;
    $output = $admin->os($post,$vid);

    print_r(json_encode($output));
?>

Result:The above code produces the following output

{
    "uid": "372",
    "act": "ostemplate",
    "timezone": 1,
    "timenow": "October 9, 2016, 4:50 am",
    "vpsid": 3609,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "Re-Install OS",
    "done": {
        "msg": "The OS was reinstalled successfully"
    },
    "oslist": {
        "kvm": {
            "centos": {
                "272": {
                    "osid": "272",
                    "type": "kvm",
                    "name": "centos-6.5-x86_64",
                    "filename": "centos-6.5-x86_64.img",
                    "size": "1074855936",
                    "pygrub": "0",
                    "drive": "",
                    "hvm": "0",
                    "perf_ops": "1",
                    "active": "1",
                    "url": "http://files.virtualizor.com/ostemplates.php?osid=272",
                    "distro": "centos",
                    "Nvirt": "kvm"
                },
                "334": {
                    "osid": "334",
                    "type": "kvm",
                    "name": "centos-7.0-x86_64",
                    "filename": "centos-7.0-x86_64.img",
                    "size": "1291845632",
                    "pygrub": "0",
                    "drive": "",
                    "hvm": "0",
                    "perf_ops": "1",
                    "active": "1",
                    "url": "http://files.virtualizor.com/ostemplates.php?osid=334",
                    "distro": "centos",
                    "Nvirt": "kvm",
                    "mg": [16]
                },
                "347": {
                    "osid": "347",
                    "type": "kvm",
                    "name": "centos-6.6-x86_64",
                    "filename": "centos-6.6-x86_64.img",
                    "size": "1074855936",
                    "pygrub": "0",
                    "drive": "",
                    "hvm": "0",
                    "perf_ops": "1",
                    "active": "1",
                    "url": "http://files.virtualizor.com/ostemplates.php?osid=347",
                    "distro": "centos",
                    "Nvirt": "kvm"
                },
                "381": {
                    "osid": "381",
                    "type": "kvm",
                    "name": "centos-7.1-x86_64",
                    "filename": "centos-7.1-x86_64.img",
                    "size": "1074855936",
                    "pygrub": "0",
                    "drive": "",
                    "hvm": "0",
                    "perf_ops": "1",
                    "active": "1",
                    "url": "http://files.virtualizor.com/ostemplates.php?osid=381",
                    "distro": "centos",
                    "Nvirt": "kvm"
                }
            },
            "debian": {
                "399": {
                    "osid": "399",
                    "type": "kvm",
                    "name": "debian-8.0-x86_64",
                    "filename": "debian-8.0-x86_64.img",
                    "size": "1073741824",
                    "pygrub": "0",
                    "drive": "",
                    "hvm": "0",
                    "perf_ops": "1",
                    "active": "1",
                    "url": "http://files.virtualizor.com/ostemplates.php?osid=399",
                    "distro": "debian",
                    "Nvirt": "kvm"
                }
            },
            "ubuntu": {
                "405": {
                    "osid": "405",
                    "type": "kvm",
                    "name": "ubuntu-15.04-x86_64",
                    "filename": "ubuntu-15.04-x86_64.img",
                    "size": "1476395008",
                    "pygrub": "0",
                    "drive": "",
                    "hvm": "0",
                    "perf_ops": "1",
                    "active": "1",
                    "url": "http://files.virtualizor.com/ostemplates.php?osid=405",
                    "distro": "ubuntu",
                    "Nvirt": "kvm"
                },
                "100067": {
                    "type": "kvm",
                    "fstype": "ext3",
                    "perf_ops": "true",
                    "url": "https://cloud-images.ubuntu.com/releases/16.04/release/ubuntu-16.04-server-cloudimg-amd64-disk1.img",
                    "filename": "ubuntu-16.04-server-cloudimg-amd64-disk1.img",
                    "name": "ubuntu-16.04-server-cloudimg-amd64-disk1.img",
                    "size": 309264384,
                    "distro": "ubuntu",
                    "Nvirt": "kvm"
                },
                "100083": {
                    "type": "kvm",
                    "url": "",
                    "filename": "ubuntu-16.04-x86_64",
                    "name": "ubuntu-16.04-x86_64",
                    "fstype": "ext3",
                    "perf_ops": "true",
                    "size": 2147483648,
                    "distro": "ubuntu",
                    "Nvirt": "kvm"
                }
            },
            "others": {
                "100053": {
                    "type": "kvm",
                    "fstype": "ext3",
                    "url": "",
                    "filename": "install-image-6.34.4.img",
                    "name": "install-image-6.34.4",
                    "size": 67108864,
                    "distro": "others",
                    "Nvirt": "kvm"
                },
                "100063": {
                    "type": "kvm",
                    "filename": "CentOSVirtioEnabledTemplate2.img",
                    "name": "CentOSVirtioEnabledTemplate2",
                    "url": "",
                    "size": 5368709120,
                    "fstype": "ext3",
                    "perf_ops": "true",
                    "distro": "others",
                    "Nvirt": "kvm"
                },
                "100065": {
                    "type": "kvm",
                    "filename": "92_openvz_abhi.img",
                    "name": "92_openvz_abhi",
                    "url": "",
                    "size": 6442450944,
                    "fstype": "ext3",
                    "perf_ops": "true",
                    "distro": "others",
                    "Nvirt": "kvm"
                },
                "100068": {
                    "type": "kvm",
                    "filename": "Ubuntu.img",
                    "name": "Ubuntu",
                    "url": "",
                    "size": 4294967296,
                    "fstype": "ext3",
                    "perf_ops": "true",
                    "distro": "others",
                    "Nvirt": "kvm"
                },
                "100070": {
                    "type": "kvm",
                    "filename": "ub16041_testx64.img",
                    "name": "ub16041_testx64",
                    "url": "",
                    "size": 5368709120,
                    "fstype": "ext3",
                    "perf_ops": "true",
                    "distro": "others",
                    "Nvirt": "kvm"
                },
                "100071": {
                    "type": "kvm",
                    "fstype": "ext3",
                    "url": "",
                    "filename": "mikrotek_chr_6363.img",
                    "name": "mikrotek_chr_6363.img",
                    "size": 134217728,
                    "distro": "others",
                    "Nvirt": "kvm"
                },
                "100081": {
                    "type": "kvm",
                    "filename": "create-template.img",
                    "name": "create-template",
                    "url": "",
                    "size": 2147483648,
                    "fstype": "ext3",
                    "perf_ops": "true",
                    "distro": "others",
                    "Nvirt": "kvm"
                },
                "100082": {
                    "type": "kvm",
                    "url": "",
                    "filename": "windows_2003R264.img",
                    "name": "windows_2003R264.img",
                    "fstype": "ext3",
                    "size": 5368709120,
                    "distro": "others",
                    "Nvirt": "kvm"
                }
            },
            "windows": {
                "100080": {
                    "type": "kvm",
                    "fstype": "ext3",
                    "perf_ops": "true",
                    "url": "",
                    "filename": "windows-2012server.img",
                    "name": "windows-2012server.img",
                    "size": 10737418240,
                    "distro": "windows",
                    "Nvirt": "kvm"
                }
            }
        },
        "openvz": {
            "centos": {
                "100077": {
                    "type": "openvz",
                    "fstype": "ext3",
                    "url": "https://download.openvz.org/template/precreated/centos-6-x86-minimal.tar.gz",
                    "filename": "centos-7-x86_64-minimal",
                    "name": "centos-7-x86_64-minimal",
                    "size": 125431402,
                    "distro": "centos",
                    "Nvirt": "openvz"
                }
            }
        }
    },
    "virt": "kvm",
    "distros": {
        "centos": {
            "distro": "centos",
            "name": "CentOS",
            "logo": "",
            "screenshot": "",
            "desc": "CentOS is an Enterprise-class Linux Distribution derived from sources freely provided to the public by a prominent North American Enterprise Linux vendor.n<br />n<br />nCentOS conforms fully with the upstream vendors redistribution policy and aims to be 100% binary compatible. CentOS mainly changes packages to remove upstream vendor branding and artwork.  n<br />n<br />nCentOS is developed by a small but growing team of core developers. CentOS is free.",
            "permanent": 1
        },
        "fedora": {
            "distro": "fedora",
            "name": "Fedora",
            "logo": "",
            "screenshot": "",
            "desc": "Fedora is a Linux-based operating system that showcases the latest in free and open source software. Fedora is always free for anyone to use, modify, and distribute. n<br />n<br />nIt is built by people across the globe who work together as a community: the Fedora Project. The Fedora Project is open and anyone is welcome to join.n<br />n<br />nThe Fedora Project is out front for you, leading the advancement of free, open software and content.",
            "permanent": 1
        },
        "suse": {
            "distro": "suse",
            "name": "openSUSE",
            "logo": "",
            "screenshot": "",
            "desc": "openSUSE is a free and Linux-based operating system for your PC, Laptop or Server. nThe openSUSE project is a worldwide effort that promotes the use of Linux everywhere. n<br />n<br />nopenSUSE creates one of the world's best Linux distributions, working together in an open, transparent and friendly manner as part of the worldwide Free and Open Source Software community.n<br />n<br />nThe project is controlled by its community and relies on the contributions of individuals, working as testers, writers, translators, usability experts, artists and ambassadors or developers.",
            "permanent": 1
        },
        "debian": {
            "distro": "debian",
            "name": "Debian",
            "desc": "Debian is a free operating system (OS) for your computer. An operating system is the set of basic programs and utilities that make your computer run. rn<br />rn<br />rnDebian uses the Linux kernel (the core of an operating system), but most of the basic OS tools come from the GNU project; hence the name GNU/Linux.rn<br />rn<br />rnDebian GNU/Linux provides more than a pure OS: it comes with over 25000 packages, precompiled software bundled up in a nice format for easy installation on your machine.",
            "logo": "",
            "screenshot": "",
            "permanent": 1
        },
        "ubuntu": {
            "distro": "ubuntu",
            "name": "Ubuntu",
            "logo": "",
            "screenshot": "",
            "desc": "Ubuntu is part of the Debian family of Linux operating systems, which has the largest pool of developer talent, with every package built by experts. n<br />n<br />Canonical's rigorous release management, quality assurance, stress testing and product design enhances the quality of Ubuntu Server.n<br />n<br />nSuper-fast and great-looking, Ubuntu is a secure, intuitive operating system that powers desktops, servers, netbooks and laptops. Ubuntu is, and always will be, absolutely free.",
            "permanent": 1
        },
        "scientific": {
            "distro": "scientific",
            "name": "Scientific",
            "logo": "",
            "screenshot": "",
            "desc": "Scientific Linux is an Enterprise Linux rebuild sponsored by Fermi National Accelerator Laboratory. n<br />n<br />Scientific Linux has been installed all over the world. At one time or another Scientific Linux has had an install base in experiments on all seven continents. It has even been loaded onto systems at the International Space Station."
        },
        "newditrosss": {
            "distro": "newditrosss",
            "name": "newditrosss",
            "desc": "",
            "logo": "http://serversub.net/img/Windows_logo_-_2012_derivative.svg.png",
            "screenshot": ""
        },
        "test": {
            "distro": "test",
            "name": "Test Distro",
            "desc": "shi &lt;b&gt; abdccsd &lt;/b&gt;asasasjljrnaskdaskd;lasdrnadasjdkaljsd",
            "logo": "http://www.littleendian.com/wp-content/uploads/windows_logo_2012_small.png",
            "screenshot": "http://i444.photobucket.com/albums/qq169/temari253/Naruto-1.jpg"
        },
        "test_distro": {
            "distro": "test_distro",
            "name": "test",
            "desc": "This is a test distro",
            "logo": "",
            "screenshot": ""
        },
        "windows": {
            "distro": "windows",
            "name": "Windows",
            "desc": "Test",
            "logo": "http://serversub.net/img/Windows_logo_-_2012_derivative.svg.png",
            "screenshot": ""
        }
    },
    "time_taken": "28.18"
}
{
    "uid": "372",
    "act": "ostemplate",
    "timezone": 1,
    "timenow": "October 9, 2016, 4:50 am",
    "vpsid": 3609,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "Re-Install OS",
    "done": {
        "msg": "The OS was reinstalled successfully"
    },
    "oslist": {
        "kvm": {
            "centos": {
                "272": {
                    "osid": "272",
                    "type": "kvm",
                    "name": "centos-6.5-x86_64",
                    "filename": "centos-6.5-x86_64.img",
                    "size": "1074855936",
                    "pygrub": "0",
                    "drive": "",
                    "hvm": "0",
                    "perf_ops": "1",
                    "active": "1",
                    "url": "http://files.virtualizor.com/ostemplates.php?osid=272",
                    "distro": "centos",
                    "Nvirt": "kvm"
                },
                "334": {
                    "osid": "334",
                    "type": "kvm",
                    "name": "centos-7.0-x86_64",
                    "filename": "centos-7.0-x86_64.img",
                    "size": "1291845632",
                    "pygrub": "0",
                    "drive": "",
                    "hvm": "0",
                    "perf_ops": "1",
                    "active": "1",
                    "url": "http://files.virtualizor.com/ostemplates.php?osid=334",
                    "distro": "centos",
                    "Nvirt": "kvm",
                    "mg": [16]
                },
                "347": {
                    "osid": "347",
                    "type": "kvm",
                    "name": "centos-6.6-x86_64",
                    "filename": "centos-6.6-x86_64.img",
                    "size": "1074855936",
                    "pygrub": "0",
                    "drive": "",
                    "hvm": "0",
                    "perf_ops": "1",
                    "active": "1",
                    "url": "http://files.virtualizor.com/ostemplates.php?osid=347",
                    "distro": "centos",
                    "Nvirt": "kvm"
                },
                "381": {
                    "osid": "381",
                    "type": "kvm",
                    "name": "centos-7.1-x86_64",
                    "filename": "centos-7.1-x86_64.img",
                    "size": "1074855936",
                    "pygrub": "0",
                    "drive": "",
                    "hvm": "0",
                    "perf_ops": "1",
                    "active": "1",
                    "url": "http://files.virtualizor.com/ostemplates.php?osid=381",
                    "distro": "centos",
                    "Nvirt": "kvm"
                }
            },
            "debian": {
                "399": {
                    "osid": "399",
                    "type": "kvm",
                    "name": "debian-8.0-x86_64",
                    "filename": "debian-8.0-x86_64.img",
                    "size": "1073741824",
                    "pygrub": "0",
                    "drive": "",
                    "hvm": "0",
                    "perf_ops": "1",
                    "active": "1",
                    "url": "http://files.virtualizor.com/ostemplates.php?osid=399",
                    "distro": "debian",
                    "Nvirt": "kvm"
                }
            },
            "ubuntu": {
                "405": {
                    "osid": "405",
                    "type": "kvm",
                    "name": "ubuntu-15.04-x86_64",
                    "filename": "ubuntu-15.04-x86_64.img",
                    "size": "1476395008",
                    "pygrub": "0",
                    "drive": "",
                    "hvm": "0",
                    "perf_ops": "1",
                    "active": "1",
                    "url": "http://files.virtualizor.com/ostemplates.php?osid=405",
                    "distro": "ubuntu",
                    "Nvirt": "kvm"
                },
                "100067": {
                    "type": "kvm",
                    "fstype": "ext3",
                    "perf_ops": "true",
                    "url": "https://cloud-images.ubuntu.com/releases/16.04/release/ubuntu-16.04-server-cloudimg-amd64-disk1.img",
                    "filename": "ubuntu-16.04-server-cloudimg-amd64-disk1.img",
                    "name": "ubuntu-16.04-server-cloudimg-amd64-disk1.img",
                    "size": 309264384,
                    "distro": "ubuntu",
                    "Nvirt": "kvm"
                },
                "100083": {
                    "type": "kvm",
                    "url": "",
                    "filename": "ubuntu-16.04-x86_64",
                    "name": "ubuntu-16.04-x86_64",
                    "fstype": "ext3",
                    "perf_ops": "true",
                    "size": 2147483648,
                    "distro": "ubuntu",
                    "Nvirt": "kvm"
                }
            },
            "others": {
                "100053": {
                    "type": "kvm",
                    "fstype": "ext3",
                    "url": "",
                    "filename": "install-image-6.34.4.img",
                    "name": "install-image-6.34.4",
                    "size": 67108864,
                    "distro": "others",
                    "Nvirt": "kvm"
                },
                "100063": {
                    "type": "kvm",
                    "filename": "CentOSVirtioEnabledTemplate2.img",
                    "name": "CentOSVirtioEnabledTemplate2",
                    "url": "",
                    "size": 5368709120,
                    "fstype": "ext3",
                    "perf_ops": "true",
                    "distro": "others",
                    "Nvirt": "kvm"
                },
                "100065": {
                    "type": "kvm",
                    "filename": "92_openvz_abhi.img",
                    "name": "92_openvz_abhi",
                    "url": "",
                    "size": 6442450944,
                    "fstype": "ext3",
                    "perf_ops": "true",
                    "distro": "others",
                    "Nvirt": "kvm"
                },
                "100068": {
                    "type": "kvm",
                    "filename": "Ubuntu.img",
                    "name": "Ubuntu",
                    "url": "",
                    "size": 4294967296,
                    "fstype": "ext3",
                    "perf_ops": "true",
                    "distro": "others",
                    "Nvirt": "kvm"
                },
                "100070": {
                    "type": "kvm",
                    "filename": "ub16041_testx64.img",
                    "name": "ub16041_testx64",
                    "url": "",
                    "size": 5368709120,
                    "fstype": "ext3",
                    "perf_ops": "true",
                    "distro": "others",
                    "Nvirt": "kvm"
                },
                "100071": {
                    "type": "kvm",
                    "fstype": "ext3",
                    "url": "",
                    "filename": "mikrotek_chr_6363.img",
                    "name": "mikrotek_chr_6363.img",
                    "size": 134217728,
                    "distro": "others",
                    "Nvirt": "kvm"
                },
                "100081": {
                    "type": "kvm",
                    "filename": "create-template.img",
                    "name": "create-template",
                    "url": "",
                    "size": 2147483648,
                    "fstype": "ext3",
                    "perf_ops": "true",
                    "distro": "others",
                    "Nvirt": "kvm"
                },
                "100082": {
                    "type": "kvm",
                    "url": "",
                    "filename": "windows_2003R264.img",
                    "name": "windows_2003R264.img",
                    "fstype": "ext3",
                    "size": 5368709120,
                    "distro": "others",
                    "Nvirt": "kvm"
                }
            },
            "windows": {
                "100080": {
                    "type": "kvm",
                    "fstype": "ext3",
                    "perf_ops": "true",
                    "url": "",
                    "filename": "windows-2012server.img",
                    "name": "windows-2012server.img",
                    "size": 10737418240,
                    "distro": "windows",
                    "Nvirt": "kvm"
                }
            }
        },
        "openvz": {
            "centos": {
                "100077": {
                    "type": "openvz",
                    "fstype": "ext3",
                    "url": "https://download.openvz.org/template/precreated/centos-6-x86-minimal.tar.gz",
                    "filename": "centos-7-x86_64-minimal",
                    "name": "centos-7-x86_64-minimal",
                    "size": 125431402,
                    "distro": "centos",
                    "Nvirt": "openvz"
                }
            }
        }
    },
    "virt": "kvm",
    "distros": {
        "centos": {
            "distro": "centos",
            "name": "CentOS",
            "logo": "",
            "screenshot": "",
            "desc": "CentOS is an Enterprise-class Linux Distribution derived from sources freely provided to the public by a prominent North American Enterprise Linux vendor.n<br />n<br />nCentOS conforms fully with the upstream vendors redistribution policy and aims to be 100% binary compatible. CentOS mainly changes packages to remove upstream vendor branding and artwork.  n<br />n<br />nCentOS is developed by a small but growing team of core developers. CentOS is free.",
            "permanent": 1
        },
        "fedora": {
            "distro": "fedora",
            "name": "Fedora",
            "logo": "",
            "screenshot": "",
            "desc": "Fedora is a Linux-based operating system that showcases the latest in free and open source software. Fedora is always free for anyone to use, modify, and distribute. n<br />n<br />nIt is built by people across the globe who work together as a community: the Fedora Project. The Fedora Project is open and anyone is welcome to join.n<br />n<br />nThe Fedora Project is out front for you, leading the advancement of free, open software and content.",
            "permanent": 1
        },
        "suse": {
            "distro": "suse",
            "name": "openSUSE",
            "logo": "",
            "screenshot": "",
            "desc": "openSUSE is a free and Linux-based operating system for your PC, Laptop or Server. nThe openSUSE project is a worldwide effort that promotes the use of Linux everywhere. n<br />n<br />nopenSUSE creates one of the world's best Linux distributions, working together in an open, transparent and friendly manner as part of the worldwide Free and Open Source Software community.n<br />n<br />nThe project is controlled by its community and relies on the contributions of individuals, working as testers, writers, translators, usability experts, artists and ambassadors or developers.",
            "permanent": 1
        },
        "debian": {
            "distro": "debian",
            "name": "Debian",
            "desc": "Debian is a free operating system (OS) for your computer. An operating system is the set of basic programs and utilities that make your computer run. rn<br />rn<br />rnDebian uses the Linux kernel (the core of an operating system), but most of the basic OS tools come from the GNU project; hence the name GNU/Linux.rn<br />rn<br />rnDebian GNU/Linux provides more than a pure OS: it comes with over 25000 packages, precompiled software bundled up in a nice format for easy installation on your machine.",
            "logo": "",
            "screenshot": "",
            "permanent": 1
        },
        "ubuntu": {
            "distro": "ubuntu",
            "name": "Ubuntu",
            "logo": "",
            "screenshot": "",
            "desc": "Ubuntu is part of the Debian family of Linux operating systems, which has the largest pool of developer talent, with every package built by experts. n<br />n<br />Canonical's rigorous release management, quality assurance, stress testing and product design enhances the quality of Ubuntu Server.n<br />n<br />nSuper-fast and great-looking, Ubuntu is a secure, intuitive operating system that powers desktops, servers, netbooks and laptops. Ubuntu is, and always will be, absolutely free.",
            "permanent": 1
        },
        "scientific": {
            "distro": "scientific",
            "name": "Scientific",
            "logo": "",
            "screenshot": "",
            "desc": "Scientific Linux is an Enterprise Linux rebuild sponsored by Fermi National Accelerator Laboratory. n<br />n<br />Scientific Linux has been installed all over the world. At one time or another Scientific Linux has had an install base in experiments on all seven continents. It has even been loaded onto systems at the International Space Station."
        },
        "newditrosss": {
            "distro": "newditrosss",
            "name": "newditrosss",
            "desc": "",
            "logo": "http://serversub.net/img/Windows_logo_-_2012_derivative.svg.png",
            "screenshot": ""
        },
        "test": {
            "distro": "test",
            "name": "Test Distro",
            "desc": "shi &lt;b&gt; abdccsd &lt;/b&gt;asasasjljrnaskdaskd;lasdrnadasjdkaljsd",
            "logo": "http://www.littleendian.com/wp-content/uploads/windows_logo_2012_small.png",
            "screenshot": "http://i444.photobucket.com/albums/qq169/temari253/Naruto-1.jpg"
        },
        "test_distro": {
            "distro": "test_distro",
            "name": "test",
            "desc": "This is a test distro",
            "logo": "",
            "screenshot": ""
        },
        "windows": {
            "distro": "windows",
            "name": "Windows",
            "desc": "Test",
            "logo": "http://serversub.net/img/Windows_logo_-_2012_derivative.svg.png",
            "screenshot": ""
        }
    },
    "time_taken": "28.18"
}

HTTP Request

https://hostname:4083/index.php?act=ostemplate&svs=vpsid

Parameters

Name Type Value Description Required
act GET ostemplate The action will reinstall the os inside the vps Yes
svs POST vpsid The vps in which the OS needs to be installed.This will be passed in URL Yes
reinsos POST 1/0 If set then the OS will be installed in the vps Yes
newos POST Int The OS that needs to be installed inside the vps. Value will be osid. Yes
newpass POST newpass The password that needs to be set inside the vps Yes
conf POST newpass Confirmation required to set the password. Yes
vid POST vpsid The vpsid in which OS will be re-installed.This will be passed as a POST Parameter Yes

Control Panel

curl -k -X POST -d "ins=plesk" -L 
"https://hostname:4083/index.php?act=controlpanel& 
svs=3609&api=json&apikey=your_api_key& 
apipass=your_api_pass"
<?php
    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'your_Server_ip';

    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);
    $panel = "webuzo";
    $vid = 3609;

    $output = $admin->controlpanel($vid,$panel);

    print_r(json_encode($output));
?>

Result: The above code produces the following output

{
    "uid": "372",
    "act": "controlpanel",
    "timezone": 1,
    "timenow": "October 9, 2016, 5:52 am",
    "vpsid": 3609,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "Control panels",
    "done": {
        "msg": "The Panel will be installed when you shutdown and then start the VPS"
    },
    "onboot": "The Panel will be installed when you shutdown and then start the VPS",
    "time_taken": "0.818"
}
{
    "uid": "372",
    "act": "controlpanel",
    "timezone": 1,
    "timenow": "October 9, 2016, 5:52 am",
    "vpsid": 3609,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "Control panels",
    "done": {
        "msg": "The Panel will be installed when you shutdown and then start the VPS"
    },
    "onboot": "The Panel will be installed when you shutdown and then start the VPS",
    "time_taken": "0.818"
}

HTTP Request

https://hostname:4083/index.php?act=controlpanel&svs=vpsid

Parameters

Name Type Value Parameters
act GET controlpanel The action which will carry out the operation and retrieve data
svs POST vpsid The vps in which the control panel has to be installed. This is passed in the url
ins POST 1/0 IF set then the control panel will be installed inside the vps
vid POSTG vpsid The vps in which the control panel has to be installed. This is passed as a POST Parameter.

Backups

backup">Backup
 curl -k -X POST -d "cbackup=1" -L 
"https://hostname:4083/index.php?act=backup&
svs=3615&api=json&apikey=your_api_key& 
apipass=your_api_pass"
<?php
    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  'your_Api_key';
    $pass = 'your_api_pass';
    $ip = 'your_Server_ip';

    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);
    $vid = 3615;
    $output = $admin->backup($vid);

    print_r(json_encode($output));
?>

Result: The above code will produce the following output

{
    "uid": "372",
    "act": "backup",
    "timezone": 1,
    "timenow": "October 9, 2016, 6:20 am",
    "vpsid": 3615,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "Backup",
    "done": {
        "msg": "The VPS backup process has been started. Please allow a few minutes for it to complete. You will recieve a notification email when its is completed"
    },
    "vps_name": "105",
    "backups_list": 0,
    "time_taken": "0.509"
}
{
    "uid": "372",
    "act": "backup",
    "timezone": 1,
    "timenow": "October 9, 2016, 6:20 am",
    "vpsid": 3615,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "Backup",
    "done": {
        "msg": "The VPS backup process has been started. Please allow a few minutes for it to complete. You will recieve a notification email when its is completed"
    },
    "vps_name": "105",
    "backups_list": 0,
    "time_taken": "0.509"
}

HTTP Request

https://hostname:4083/index.php?act=backup&svs=vpsid

Parameters

Name Type Value Description Required
act GET backup The action specified will take backup of the vps Yes
svs POST vpsid The vps whose backup will be taken Yes

Restoring backup

curl -k -X POST -d "restore=1" -L
"https://hostname:4083/index.php?act=backup& 
svs=3615&api=json&apikey=your_api_key& 
apipass=your_api_pass"
<?php
    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'your_Server_ip';

    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);
    $vid = 3615;
    $post['restore'] = 1;
    $output = $admin->restore_backup($post, $vid);

    print_r(json_encode($output));
?>

Result: The output of the above code

{
    "uid": "372",
    "act": "backup",
    "timezone": 1,
    "timenow": "October 9, 2016, 7:21 am",
    "vpsid": 3615,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "Backup",
    "done": {
        "msg": "The VPS restore process has been started. Please allow a few minutes for it to complete. You will recieve a notification email when its is completed"
    },
    "vps_name": "105",
    "backups_list": 1,
    "time_taken": "2.041"
}
{
    "uid": "372",
    "act": "backup",
    "timezone": 1,
    "timenow": "October 9, 2016, 7:21 am",
    "vpsid": 3615,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "Backup",
    "done": {
        "msg": "The VPS restore process has been started. Please allow a few minutes for it to complete. You will recieve a notification email when its is completed"
    },
    "vps_name": "105",
    "backups_list": 1,
    "time_taken": "2.041"
}

HTTP Request

https://hostname:4083/index.php?act=backups&svs=vpsid

Parameters

Name Type Value Description Required
act GET backups The action which will restore backups Yes
svs POST vpsid The vps which needs to be restored. This is passed in URL Yes
restore POST 1/0 If set then the vps backup will be restored Yes
vid POST vpsid The vps which needs to be restored.This is passed as a POST Parameter Yes

Delete Backup

curl -k -X POST -d "del_backup=1" -L 
"https://hostname:4083/index.php?act=backup& 
svs=3615&api=json&apikey=your_api_key& 
apipass=your_api_pass"
<?php
    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  'your_api_key';
    $pass = 'your_Apia_pass';
    $ip = 'your_Server_ip';

    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);
    $vid = 3615;
    $post['del_backup'] = 1;
    $output = $admin->delete_backup($post, $vid);

    print_r(json_encode($output));
?>

Result: The output of the above code

{
    "uid": "372",
    "act": "backup",
    "timezone": 1,
    "timenow": "October 9, 2016, 7:32 am",
    "vpsid": 3615,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "Backup",
    "done": {
        "msg": "The VPS backup deletion process has been started. Please allow a few minutes for it to complete. You will recieve a notification email when its is completed."
    },
    "vps_name": "105",
    "backups_list": 0,
    "time_taken": "0.533"
}
{
    "uid": "372",
    "act": "backup",
    "timezone": 1,
    "timenow": "October 9, 2016, 7:32 am",
    "vpsid": 3615,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "Backup",
    "done": {
        "msg": "The VPS backup deletion process has been started. Please allow a few minutes for it to complete. You will recieve a notification email when its is completed."
    },
    "vps_name": "105",
    "backups_list": 0,
    "time_taken": "0.533"
}

HTTP Request

https://hostname:4083/index.php?act=backups&svs=vpsid

Parameters
Name Type Value Description Required
act GET backups The action which will delete backups Yes
svs POST vpsid The vps which needs to be deleted. This is passed in URL Yes
del_backups POST 1/0 If set then the vps backup will be deleted Yes
vid POST vpsid The vps which needs to be deleted.This is passed as a POST Parameter Yes

Processes

List Processes

curl -k -X GET -L "https://hostname:4083/index.php?act=processes& 
svs=3615&api=json&apikey=your_api_key& 
apipass=your_api_pass"
<?php
    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'your_server_ip';

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

    $vid = 3615;
    $output = $admin->processes($vid);

    print_r(json_encode($output));
?>

Result : The above code produces the following output

{
    "uid": "372",
    "act": "processes",
    "timezone": 1,
    "timenow": "October 11, 2016, 1:11 am",
    "vpsid": 3615,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "List of Processes",
    "processes": [{
        "PID": "1",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.3",
        "RSS": "3564",
        "TT": "?",
        "STAT": "Ss",
        "TIME": "00:00:01",
        "COMMAND": "init -z"
    }, {
        "PID": "2",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.0",
        "RSS": "0",
        "TT": "?",
        "STAT": "S",
        "TIME": "00:00:00",
        "COMMAND": "[kthreadd/105]"
    }, {
        "PID": "3",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.0",
        "RSS": "0",
        "TT": "?",
        "STAT": "S",
        "TIME": "00:00:00",
        "COMMAND": "[khelper/105]"
    }, {
        "PID": "75",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.2",
        "RSS": "2456",
        "TT": "?",
        "STAT": "Ss",
        "TIME": "00:00:00",
        "COMMAND": "/usr/lib/systemd/systemd-journald"
    }, {
        "PID": "83",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.1",
        "RSS": "1680",
        "TT": "?",
        "STAT": "Ss",
        "TIME": "00:00:00",
        "COMMAND": "/usr/lib/systemd/systemd-udevd"
    }, {
        "PID": "120",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.1",
        "RSS": "1524",
        "TT": "?",
        "STAT": "Ss",
        "TIME": "00:00:00",
        "COMMAND": "/usr/lib/systemd/systemd-logind"
    }, {
        "PID": "122",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.3",
        "RSS": "3596",
        "TT": "?",
        "STAT": "Ss",
        "TIME": "00:00:00",
        "COMMAND": "/usr/sbin/sshd -D"
    }, {
        "PID": "128",
        "USER": "dbus",
        "%CPU": "0.0",
        "%MEM": "0.1",
        "RSS": "1648",
        "TT": "?",
        "STAT": "Ss",
        "TIME": "00:00:00",
        "COMMAND": "/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation"
    }, {
        "PID": "144",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.0",
        "RSS": "796",
        "TT": "tty2",
        "STAT": "Ss+",
        "TIME": "00:00:00",
        "COMMAND": "/sbin/agetty --noclear tty2 linux"
    }, {
        "PID": "145",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.0",
        "RSS": "792",
        "TT": "tty1",
        "STAT": "Ss+",
        "TIME": "00:00:00",
        "COMMAND": "/sbin/agetty --noclear --keep-baud console 115200 38400 9600 vt220"
    }, {
        "PID": "6314",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.1",
        "RSS": "1636",
        "TT": "?",
        "STAT": "Rs",
        "TIME": "00:00:00",
        "COMMAND": "ps ax -eo pid,user,pcpu,pmem,rss,tty,stat,time,command"
    }],
    "processes_head": ["PID", "USER", "%CPU", "%MEM", "RSS", "TT", "STAT", "TIME", "COMMAND"],
    "time_taken": "0.294"
}
{
    "uid": "372",
    "act": "processes",
    "timezone": 1,
    "timenow": "October 11, 2016, 1:11 am",
    "vpsid": 3615,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "List of Processes",
    "processes": [{
        "PID": "1",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.3",
        "RSS": "3564",
        "TT": "?",
        "STAT": "Ss",
        "TIME": "00:00:01",
        "COMMAND": "init -z"
    }, {
        "PID": "2",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.0",
        "RSS": "0",
        "TT": "?",
        "STAT": "S",
        "TIME": "00:00:00",
        "COMMAND": "[kthreadd/105]"
    }, {
        "PID": "3",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.0",
        "RSS": "0",
        "TT": "?",
        "STAT": "S",
        "TIME": "00:00:00",
        "COMMAND": "[khelper/105]"
    }, {
        "PID": "75",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.2",
        "RSS": "2456",
        "TT": "?",
        "STAT": "Ss",
        "TIME": "00:00:00",
        "COMMAND": "/usr/lib/systemd/systemd-journald"
    }, {
        "PID": "83",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.1",
        "RSS": "1680",
        "TT": "?",
        "STAT": "Ss",
        "TIME": "00:00:00",
        "COMMAND": "/usr/lib/systemd/systemd-udevd"
    }, {
        "PID": "120",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.1",
        "RSS": "1524",
        "TT": "?",
        "STAT": "Ss",
        "TIME": "00:00:00",
        "COMMAND": "/usr/lib/systemd/systemd-logind"
    }, {
        "PID": "122",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.3",
        "RSS": "3596",
        "TT": "?",
        "STAT": "Ss",
        "TIME": "00:00:00",
        "COMMAND": "/usr/sbin/sshd -D"
    }, {
        "PID": "128",
        "USER": "dbus",
        "%CPU": "0.0",
        "%MEM": "0.1",
        "RSS": "1648",
        "TT": "?",
        "STAT": "Ss",
        "TIME": "00:00:00",
        "COMMAND": "/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation"
    }, {
        "PID": "144",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.0",
        "RSS": "796",
        "TT": "tty2",
        "STAT": "Ss+",
        "TIME": "00:00:00",
        "COMMAND": "/sbin/agetty --noclear tty2 linux"
    }, {
        "PID": "145",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.0",
        "RSS": "792",
        "TT": "tty1",
        "STAT": "Ss+",
        "TIME": "00:00:00",
        "COMMAND": "/sbin/agetty --noclear --keep-baud console 115200 38400 9600 vt220"
    }, {
        "PID": "6314",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.1",
        "RSS": "1636",
        "TT": "?",
        "STAT": "Rs",
        "TIME": "00:00:00",
        "COMMAND": "ps ax -eo pid,user,pcpu,pmem,rss,tty,stat,time,command"
    }],
    "processes_head": ["PID", "USER", "%CPU", "%MEM", "RSS", "TT", "STAT", "TIME", "COMMAND"],
    "time_taken": "0.294"
}

HTTP Request

https://hostname:4083/index.php?act=processes&svs=vpsid

Parameters

Name Type Value Description Required
act GET processes The action will display a list of processes Yes
svs POST vpsid The vpsid whose processes need to be listed. Sent using URL. Yes
vid POST Int The vpsid whose processes need to be listed. Sent as a post parameter. Yes

Kill Processes

curl -k -X POST -d "sel_proc[]=144&sel_proc[]=7270" -L 
"https://hostname:4083/index.php?act=processes& 
svs=3615&api=json&apikey=your_api_key& 
apipass=your_api_pass"

<?php
    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'your_server_ip';

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

    $vid = 3615;    
    $post['sel_proc'] = array(75,83,128);
    $output = $admin->processes($post,$vid);

    print_r(json_encode($output));
?>

Result: The above code will produce the following output

{
    "uid": "372",
    "act": "processes",
    "timezone": 1,
    "timenow": "October 11, 2016, 1:41 am",
    "vpsid": 3615,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "List of Processes",
    "processes": [{
        "PID": "1",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.3",
        "RSS": "3564",
        "TT": "?",
        "STAT": "Ss",
        "TIME": "00:00:01",
        "COMMAND": "init -z"
    }, {
        "PID": "2",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.0",
        "RSS": "0",
        "TT": "?",
        "STAT": "S",
        "TIME": "00:00:00",
        "COMMAND": "[kthreadd/105]"
    }, {
        "PID": "3",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.0",
        "RSS": "0",
        "TT": "?",
        "STAT": "S",
        "TIME": "00:00:00",
        "COMMAND": "[khelper/105]"
    }, {
        "PID": "120",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.1",
        "RSS": "1524",
        "TT": "?",
        "STAT": "Ss",
        "TIME": "00:00:00",
        "COMMAND": "/usr/lib/systemd/systemd-logind"
    }, {
        "PID": "122",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.3",
        "RSS": "3596",
        "TT": "?",
        "STAT": "Ss",
        "TIME": "00:00:00",
        "COMMAND": "/usr/sbin/sshd -D"
    }, {
        "PID": "144",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.0",
        "RSS": "796",
        "TT": "tty2",
        "STAT": "Ss+",
        "TIME": "00:00:00",
        "COMMAND": "/sbin/agetty --noclear tty2 linux"
    }, {
        "PID": "145",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.0",
        "RSS": "792",
        "TT": "tty1",
        "STAT": "Ss+",
        "TIME": "00:00:00",
        "COMMAND": "/sbin/agetty --noclear --keep-baud console 115200 38400 9600 vt220"
    }, {
        "PID": "7270",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.1",
        "RSS": "1872",
        "TT": "?",
        "STAT": "Ss",
        "TIME": "00:00:00",
        "COMMAND": "/usr/lib/systemd/systemd-journald"
    }, {
        "PID": "7277",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.1",
        "RSS": "1612",
        "TT": "?",
        "STAT": "Ss",
        "TIME": "00:00:00",
        "COMMAND": "/usr/lib/systemd/systemd-udevd"
    }, {
        "PID": "7283",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.1",
        "RSS": "1628",
        "TT": "?",
        "STAT": "Rs",
        "TIME": "00:00:00",
        "COMMAND": "ps ax -eo pid,user,pcpu,pmem,rss,tty,stat,time,command"
    }],
    "processes_head": ["PID", "USER", "%CPU", "%MEM", "RSS", "TT", "STAT", "TIME", "COMMAND"],
    "time_taken": "1.572"
}
{
    "uid": "372",
    "act": "processes",
    "timezone": 1,
    "timenow": "October 11, 2016, 1:41 am",
    "vpsid": 3615,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "List of Processes",
    "processes": [{
        "PID": "1",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.3",
        "RSS": "3564",
        "TT": "?",
        "STAT": "Ss",
        "TIME": "00:00:01",
        "COMMAND": "init -z"
    }, {
        "PID": "2",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.0",
        "RSS": "0",
        "TT": "?",
        "STAT": "S",
        "TIME": "00:00:00",
        "COMMAND": "[kthreadd/105]"
    }, {
        "PID": "3",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.0",
        "RSS": "0",
        "TT": "?",
        "STAT": "S",
        "TIME": "00:00:00",
        "COMMAND": "[khelper/105]"
    }, {
        "PID": "120",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.1",
        "RSS": "1524",
        "TT": "?",
        "STAT": "Ss",
        "TIME": "00:00:00",
        "COMMAND": "/usr/lib/systemd/systemd-logind"
    }, {
        "PID": "122",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.3",
        "RSS": "3596",
        "TT": "?",
        "STAT": "Ss",
        "TIME": "00:00:00",
        "COMMAND": "/usr/sbin/sshd -D"
    }, {
        "PID": "144",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.0",
        "RSS": "796",
        "TT": "tty2",
        "STAT": "Ss+",
        "TIME": "00:00:00",
        "COMMAND": "/sbin/agetty --noclear tty2 linux"
    }, {
        "PID": "145",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.0",
        "RSS": "792",
        "TT": "tty1",
        "STAT": "Ss+",
        "TIME": "00:00:00",
        "COMMAND": "/sbin/agetty --noclear --keep-baud console 115200 38400 9600 vt220"
    }, {
        "PID": "7270",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.1",
        "RSS": "1872",
        "TT": "?",
        "STAT": "Ss",
        "TIME": "00:00:00",
        "COMMAND": "/usr/lib/systemd/systemd-journald"
    }, {
        "PID": "7277",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.1",
        "RSS": "1612",
        "TT": "?",
        "STAT": "Ss",
        "TIME": "00:00:00",
        "COMMAND": "/usr/lib/systemd/systemd-udevd"
    }, {
        "PID": "7283",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.1",
        "RSS": "1628",
        "TT": "?",
        "STAT": "Rs",
        "TIME": "00:00:00",
        "COMMAND": "ps ax -eo pid,user,pcpu,pmem,rss,tty,stat,time,command"
    }],
    "processes_head": ["PID", "USER", "%CPU", "%MEM", "RSS", "TT", "STAT", "TIME", "COMMAND"],
    "time_taken": "1.572"
}

HTTP Request

https://hostname:4083/index.php?act=processes&svs=vpsid

Parameters

Name Type Value Description Required
act GET processes The action list processes after the selected processes have been killed Yes
svs POST vpsid The vpsid whose processes need to be killed. Sent using URL. Yes
vid POST Int The vpsid whose processes need to be killed. Sent as a post parameter. Yes
sel_proc POST Int The list of processes that will be killed. Yes

System Alerts

curl -k -X GET -L "https://hostname:4083/index.php?act=system_alerts& 
svs=3615&api=json&apikey=your_api_key& 
apipass=your_api_pass"
<?php
    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'your_server_ip';

    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);
    $vid = 3615;
    $output = $admin->system_alerts($vid);

    print_r(json_encode($output));  
?>

Result:The Above code produces the following output

{
    "uid": "372",
    "act": "system_alerts",
    "timezone": 1,
    "timenow": "October 11, 2016, 5:41 am",
    "vpsid": 3615,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "System Alerts",
    "alerts": [{
        "vpsid": "3615",
        "time": "1476160806",
        "cpu": "2.37",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476160326",
        "cpu": "0.10",
        "ram": "1.27",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476159846",
        "cpu": "0.10",
        "ram": "1.27",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476159366",
        "cpu": "0.10",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476158887",
        "cpu": "0.10",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476158406",
        "cpu": "0.10",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476158166",
        "cpu": "0.10",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476157686",
        "cpu": "2.32",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476157206",
        "cpu": "2.37",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476156726",
        "cpu": "2.37",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476156246",
        "cpu": "2.37",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476155766",
        "cpu": "0.10",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476155286",
        "cpu": "0.10",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476154806",
        "cpu": "0.10",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476154566",
        "cpu": "2.37",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476154086",
        "cpu": "2.37",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476153607",
        "cpu": "0.10",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476153126",
        "cpu": "0.10",
        "ram": "1.27",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476152646",
        "cpu": "2.37",
        "ram": "1.27",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476152167",
        "cpu": "0.10",
        "ram": "0.98",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476151685",
        "cpu": "0.10",
        "ram": "0.78",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476151205",
        "cpu": "0.10",
        "ram": "0.78",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476150965",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476150486",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476150005",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476149526",
        "cpu": "2.37",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476149045",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476148565",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476148086",
        "cpu": "2.32",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476147605",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476147365",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476146885",
        "cpu": "2.32",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476146406",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476145925",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476145445",
        "cpu": "2.37",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476144966",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476144485",
        "cpu": "2.37",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476144005",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476143765",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476143285",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476142805",
        "cpu": "2.37",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476142325",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476141845",
        "cpu": "2.32",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476141366",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476140885",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476140406",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476140166",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476139685",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476139206",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476138725",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }],
    "num_res": "380",
    "time_taken": "0.112"
}
{
    "uid": "372",
    "act": "system_alerts",
    "timezone": 1,
    "timenow": "October 11, 2016, 5:41 am",
    "vpsid": 3615,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "System Alerts",
    "alerts": [{
        "vpsid": "3615",
        "time": "1476160806",
        "cpu": "2.37",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476160326",
        "cpu": "0.10",
        "ram": "1.27",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476159846",
        "cpu": "0.10",
        "ram": "1.27",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476159366",
        "cpu": "0.10",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476158887",
        "cpu": "0.10",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476158406",
        "cpu": "0.10",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476158166",
        "cpu": "0.10",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476157686",
        "cpu": "2.32",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476157206",
        "cpu": "2.37",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476156726",
        "cpu": "2.37",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476156246",
        "cpu": "2.37",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476155766",
        "cpu": "0.10",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476155286",
        "cpu": "0.10",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476154806",
        "cpu": "0.10",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476154566",
        "cpu": "2.37",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476154086",
        "cpu": "2.37",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476153607",
        "cpu": "0.10",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476153126",
        "cpu": "0.10",
        "ram": "1.27",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476152646",
        "cpu": "2.37",
        "ram": "1.27",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476152167",
        "cpu": "0.10",
        "ram": "0.98",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476151685",
        "cpu": "0.10",
        "ram": "0.78",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476151205",
        "cpu": "0.10",
        "ram": "0.78",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476150965",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476150486",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476150005",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476149526",
        "cpu": "2.37",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476149045",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476148565",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476148086",
        "cpu": "2.32",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476147605",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476147365",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476146885",
        "cpu": "2.32",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476146406",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476145925",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476145445",
        "cpu": "2.37",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476144966",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476144485",
        "cpu": "2.37",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476144005",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476143765",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476143285",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476142805",
        "cpu": "2.37",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476142325",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476141845",
        "cpu": "2.32",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476141366",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476140885",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476140406",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476140166",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476139685",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476139206",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476138725",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }],
    "num_res": "380",
    "time_taken": "0.112"
}

HTTP Request

https://hostname:4083/index.php?act=system_alerts&svs=vpsid

Parameters

Name Type Value Description Required
act GET system_alerts The action will return the system alerts Yes
svs POST vpsid The vpsid whose system alerts have to be listed. Will be sent via URL. Yes
vid POST vpsid The vpsid whose system alerts have to be listed. Will be sent as a POST Parameter. Yes

Services

List Services

curl -k -X GET -L "https://hostname:4083/index.php?act=services& 
svs=3615&api=json&apikey=your_api_key& 
apipass=your_api_pass"
<?php
    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'your_server_ip';

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

    $vid = 3615;

    $output = $admin->services($vid);

    print_r(json_encode($output));

Result: The above code will produce the following output

{
    "uid": "372",
    "act": "services",
    "timezone": 1,
    "timenow": "October 11, 2016, 2:11 am",
    "vpsid": 3615,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "Services",
    "services": ["systemd", "kthreadd/105", "khelper/105", "sshd", "agetty", "network", "vzquota"],
    "autostart": ["network", "vzquota"],
    "running": {
        "1": "systemd",
        "2": "kthreadd/105",
        "3": "khelper/105",
        "5": "sshd",
        "6": "agetty"
    },
    "time_taken": "0.393"
}
{
    "services": ["systemd", "kthreadd/105", "khelper/105", "sshd", "agetty", "network", "vzquota"],
    "autostart": ["network", "vzquota"],
    "running": {
        "1": "systemd",
        "2": "kthreadd/105",
        "3": "khelper/105",
        "5": "sshd",
        "6": "agetty"
    }
}

HTTP Request

https://hostname:4083/index.php?act=services&svs=3615

Parameters

Name Type Value Description Required
act GET services The action will list services that are currently running inside the vps Yes
svs POST vpsid The vpsid whose services have to be listed. Will be sent via URL Yes
vid POST vpsid The vpsid whose services have to be listed. Will be sent as a POST Parameter Yes

Start Service

curl -k -X POST -d "start_x=1&sel_serv[]=httpd" -L 
"https://hostname:4083/index.php?act=services& 
svs=3615&api=json&apikey=your_api_key& 
apipass=you_api_pass"
<?php
    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  'your_api_key';
    $pass = 'you_api_pass';
    $ip = 'your_Server_ip';

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

    $vid = 3615;

    $post['start_x'] = 1;
    $post['sel_serv'][] = 'httpd';
    $post['sel_serv'][] = 'httpd';

    $output = $admin->services($post,$vid);

    print_r(json_encode($output));
?>

Result: The above code produces the following result

{
    "uid": "372",
    "act": "services",
    "timezone": 1,
    "timenow": "October 11, 2016, 3:18 am",
    "vpsid": 3615,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "Services",
    "services": {
        "0": "init",
        "1": "kthreadd/105",
        "2": "khelper/105",
        "3": "udevd",
        "4": "rc",
        "5": "rsyslogd",
        "6": "xinetd",
        "7": "saslauthd",
        "8": "S80sendmail",
        "9": "sendmail",
        "10": "bash",
        "11": "sshd",
        "12": "httpd",
        "13": "crond",
        "15": "iptables",
        "16": "modules_dep",
        "17": "network",
        "18": "rsyslog",
        "22": "vzquota"
    },
    "autostart": ["crond", "httpd", "iptables", "modules_dep", "network", "rsyslog", "saslauthd", "sendmail", "sshd", "vzquota", "xinetd"],
    "running": {
        "1": "init",
        "2": "kthreadd/105",
        "3": "khelper/105",
        "4": "udevd",
        "5": "rc",
        "6": "rsyslogd",
        "7": "xinetd",
        "8": "saslauthd",
        "10": "S80sendmail",
        "11": "sendmail",
        "12": "bash",
        "14": "sshd",
        "15": "httpd"
    },
    "time_taken": "1.609"
}
{
    "services": {
        "0": "init",
        "1": "kthreadd/105",
        "2": "khelper/105",
        "3": "udevd",
        "4": "rsyslogd",
        "5": "xinetd",
        "6": "saslauthd",
        "7": "sendmail",
        "8": "sshd",
        "9": "httpd",
        "10": "crond",
        "11": "mingetty",
        "14": "iptables",
        "15": "modules_dep",
        "16": "network",
        "17": "rsyslog",
        "21": "vzquota"
    },
    "autostart": ["crond", "httpd", "iptables", "modules_dep", "network", "rsyslog", "saslauthd", "sendmail", "sshd", "vzquota", "xinetd"],
    "running": {
        "1": "init",
        "2": "kthreadd/105",
        "3": "khelper/105",
        "4": "udevd",
        "5": "rsyslogd",
        "6": "xinetd",
        "7": "saslauthd",
        "9": "sendmail",
        "10": "sshd",
        "11": "httpd",
        "14": "crond",
        "15": "mingetty"
    }
}

HTTP Request

https://hostname:4083/index.php?act=services&svs=vpsid

Parameters

Name Type Value Description Required
act GET services The action which will list services that are running inside the vps. Yes
svs POST vpsid The vpsid whose services have to be started. Will be sent via URL. Yes
vid POST vpsid The vpsid whose services have to be started. Will be sent as a POST Parameter. Yes
start_x POST 1/0 If set then the start method will start the process. Yes
sel_serv POST sel_serv Name of the service that needs to be started. Yes

Stop Services

curl -k -X POST -d "stop_x=1&sel_serv[]=sshd" -L 
"https://hostname:4083/index.php?act=services& 
svs=3615&api=json&apikey=your_api_key& 
apipass=your_api_pass"
<?php
    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'your_server_ip';

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

    $vid = 3615;

    $post['stop_x'] = 1;
    $post['sel_serv'][] = 'sshd';

    $output = $admin->services($post,$vid);

    print_r(json_encode($output));
?>

Result:The above code produces the following output

{
    "uid": "372",
    "act": "services",
    "timezone": 1,
    "timenow": "October 11, 2016, 3:50 am",
    "vpsid": 3615,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "Services",
    "services": {
        "0": "init",
        "1": "kthreadd/105",
        "2": "khelper/105",
        "3": "udevd",
        "4": "rsyslogd",
        "5": "xinetd",
        "6": "saslauthd",
        "7": "sendmail",
        "8": "httpd",
        "9": "mingetty",
        "10": "crond",
        "12": "iptables",
        "13": "modules_dep",
        "14": "network",
        "15": "rsyslog",
        "18": "sshd",
        "19": "vzquota"
    },
    "autostart": ["crond", "httpd", "iptables", "modules_dep", "network", "rsyslog", "saslauthd", "sendmail", "sshd", "vzquota", "xinetd"],
    "running": {
        "1": "init",
        "2": "kthreadd/105",
        "3": "khelper/105",
        "4": "udevd",
        "5": "rsyslogd",
        "6": "xinetd",
        "7": "saslauthd",
        "9": "sendmail",
        "10": "httpd",
        "13": "mingetty"
    },
    "time_taken": "1.762"
}
{
    "services": {
        "0": "init",
        "1": "kthreadd/105",
        "2": "khelper/105",
        "3": "udevd",
        "4": "rsyslogd",
        "5": "xinetd",
        "6": "saslauthd",
        "7": "sendmail",
        "8": "httpd",
        "9": "mingetty",
        "10": "crond",
        "12": "iptables",
        "13": "modules_dep",
        "14": "network",
        "15": "rsyslog",
        "18": "sshd",
        "19": "vzquota"
    },
    "autostart": ["crond", "httpd", "iptables", "modules_dep", "network", "rsyslog", "saslauthd", "sendmail", "sshd", "vzquota", "xinetd"],
    "running": {
        "1": "init",
        "2": "kthreadd/105",
        "3": "khelper/105",
        "4": "udevd",
        "5": "rsyslogd",
        "6": "xinetd",
        "7": "saslauthd",
        "9": "sendmail",
        "10": "httpd",
        "13": "mingetty"
    }
}

HTTP Request

https://hostname:4083/index.php?act=services&svs=vpsid

Parameters

Name Type Value Description Required
act GET services The action which will list services that are running inside the vps Yes
svs POST vpsid The vpsid whose services have to be stopped. Will be sent via URL Yes
vid POST vpsid The vpsid whose services have to be stopped. Will be sent as a POST Parameter Yes
stop_x POST 1/0 If set then the start method will stop the process Yes
sel_serv POST sel_serv Name of the service that needs to be started Yes

Restart Services

curl -k -X POST -d "restart_x=1&sel_serv=mingetty" -L
"https://hostname:4083/index.php?act=services& 
svs=3615&api=json&apikey=your_api_key& 
apipass=your_api_pass"
<?php
    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  'your_api_key';
    $pass = 'you_api_pass';
    $ip = 'your_server_ip';

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

    $vid = 3615;

    $post['restart_x'] = 1;
    $post['sel_serv'][] = 'sshd';

    $output = $admin->services($post,$vid);

    print_r(json_encode($output));
?>

Result: The above code produces the following output

{
    "uid": "372",
    "act": "services",
    "timezone": 1,
    "timenow": "October 11, 2016, 3:50 am",
    "vpsid": 3615,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "Services",
    "services": {
        "0": "init",
        "1": "kthreadd/105",
        "2": "khelper/105",
        "3": "udevd",
        "4": "rsyslogd",
        "5": "xinetd",
        "6": "saslauthd",
        "7": "sendmail",
        "8": "httpd",
        "9": "mingetty",
        "10": "crond",
        "12": "iptables",
        "13": "modules_dep",
        "14": "network",
        "15": "rsyslog",
        "19": "vzquota"
    },
    "autostart": ["crond", "httpd", "iptables", "modules_dep", "network", "rsyslog", "saslauthd", "sendmail", "sshd", "vzquota", "xinetd"],
    "running": {
        "1": "init",
        "2": "kthreadd/105",
        "3": "khelper/105",
        "4": "udevd",
        "5": "rsyslogd",
        "6": "xinetd",
        "7": "saslauthd",
        "9": "sendmail",
        "10": "httpd",
        "11": "sshd",
        "13": "mingetty"
    },
    "time_taken": "1.762"
}
{
    "services": {
        "0": "init",
        "1": "kthreadd/105",
        "2": "khelper/105",
        "3": "udevd",
        "4": "rsyslogd",
        "5": "xinetd",
        "6": "saslauthd",
        "7": "sendmail",
        "8": "httpd",
        "9": "mingetty",
        "10": "crond",
        "12": "iptables",
        "13": "modules_dep",
        "14": "network",
        "15": "rsyslog",
        "19": "vzquota"
    },
    "autostart": ["crond", "httpd", "iptables", "modules_dep", "network", "rsyslog", "saslauthd", "sendmail", "sshd", "vzquota", "xinetd"],
    "running": {
        "1": "init",
        "2": "kthreadd/105",
        "3": "khelper/105",
        "4": "udevd",
        "5": "rsyslogd",
        "6": "xinetd",
        "7": "saslauthd",
        "9": "sendmail",
        "10": "httpd",
        "12": "sshd",
        "13": "mingetty"
    }
}

HTTP Request

https://hostname:4083/index.php?act=services&svs=vpsid

Parameters

Name Type Value Description Required
act GET services The action which will list services that are running inside the vps. Yes
svs POST vpsid The vpsid whose services have to be restarted. Will be sent via URL. Yes
vid POST vpsid The vpsid whose services have to be restarted. Will be sent as a POST Parameter. Yes
restart_x POST 1/0 If set then the restart method will start the process. Yes
sel_serv POST sel_serv Name of the service that needs to be restarted. Yes