Get Virtualizor

Vertical Scaling Data

Use the vertical scaling data API to save the data for vps.you will get response in "ver_done" (Since V3.1.3)

HTTP Request

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

Note
  1. Vertical scaling is supported on KVM based virtualization only.
  2. QEMU version should be greater than or equal to 1.5, To check QEMU Version run "/usr/bin/virsh version"
  3. Vertical scaling is currently not supported on Windows VPS

Parameters

NameTypeValueDescriptionRequired
actGETvpsmanageThe action which will return data belonging to a particular pageYes
svsPOSTVPSIDProvide vpsid of the VM for which you want to save the data.
Yes
vs_ver_ram_inc_byPOSTint(In GB)If set then while scaling, ram will be increased/decreased using this parameter.
Yes
vs_ver_cpu_inc_byPOSTint(cores)If set then while scaling, CPU cores will be increased/decreased using this parameter.Yes

Sample Code

PHP

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

    $v = new Virtualizor_Enduser_API($ip, $key, $pass);
	
    $vid = 6710; //vpsid
$post['vs_ver_ram_inc_by'] = 2;
$post['vs_ver_cpu_inc_by'] = 1; $vps = $v->save_vertical_data($vid, $post); print_r(json_encode($vps)); ?>

Curl

curl -k -X POST -d "save_ver_data=1&vs_ver_ram_inc_by=2&vs_ver_cpu_inc_by=1" -L "https://hostname:4083/index.php?act=vpsmanage&svs=6710&api=json&apikey=your_api_key&apipass=your_api_pass"

Output

{
   "uid":"600",
   "act":"vpsmanage",
   "timezone":2,
   "timenow":"July 24, 2019, 12:24 pm",
   "vpsid":6710,
   "username":"a@a.com",
   "user_type":"2",
   "preferences":{
      "theme":"default",
      "language":"english",
      "timezone":2
   },
   "url":"index.php?",
   "rdns":{
      "pdnsid":null
   },
   "support_link":"http:\/\/softaculous.com",
   "enable_eu_iso":1,
   "billing_symbol":"$",
   "enable_registration":0,
   "inhouse_billing":"0",
   "title":"KVMTestServer",
   "info":{
      "os":{
         "osid":"626",
         "type":"kvm",
         "name":"centos-6.9-x86_64",
         "filename":"centos-6.9-x86_64.img",
         "size":"1291845632",
         "pygrub":"0",
         "drive":"",
         "hvm":"0",
         "perf_ops":"1",
         "active":"1",
         "url":"http:\/\/files.virtualizor.com\/ostemplates.php?osid=626",
         "distro":"centos",
         "Nvirt":"kvm",
         "distro_logo":"centos_60.gif"
      },
"ver_done" : "The settings have been save successfully"
"time_taken":"2.352" }
    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list