Get Virtualizor

Reset Bandwidth

Use Reset Bandwidth API to reset bandwidth of vps manually it takes bwreset as parameter (i.e. vpsid) and in response it gives done parameter that contains 1 if successful .

HTTP Request

https://hostname:4085/index.php?act=vs&action=start&vpsid=VPSID

Parameters

NameMethodValueDescriptionRequired
actGETvsThe action specified to retrieve data after vps is startedYes
bwresetGETIntThe ID of the vps.Yes

Sample Code

<?php

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

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

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

    $bwreset = 2; //VPS ID

    $output = $admin->resetbandwidth($bwreset);

    print_r(json_encode($output));

?>

Output

{
   "title":"Virtual Servers",
   "done_msg":"The Bandwidth was reset successfully",
   "done":1,
   "timenow":1575526769,
   "time_taken":"0.071"
}
    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list