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
Name | Method | Value | Description | Required |
---|---|---|---|---|
act | GET | vs | The action specified to retrieve data after vps is started | Yes |
bwreset | GET | Int | The 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"
}