Get Virtualizor

CPU

Use CPU API to get complete details of VPS cpu of your server.

HTTP Request

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

Parameters

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

Sample Code

PHP

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

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

Curl

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

Output

{
   "uid":"600",
   "act":"cpu",
   "timezone":2,
   "timenow":"July 24, 2019, 1:01 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",
   "cpu":{
      "manu":"intel",
      "limit":3770.01,
      "used":45.24,
      "free":3724.77,
      "percent":1.2,
      "percent_free":98.8
   },
   "time_taken":"1.795"
}
    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list