This function changes VPS plan of a VPS. Due to virtual HW changes the VPS is shut down for the time of change. The outage duration is dependent on both source and target plan and current system load.
|vserver_id||unique id of VPS*|
|plan_id||unique VPS plan identifier*|
|disk_size||desired VPS disk size|
|Returns:||HTTP code||200 (OK)|
|VPS parameters changed. VPS change process has been started. Reply portion reply is empty.|
If disk_size parameter is set the disk size will be fixed for this VPS. That means that consequent upgrade/downgrade function call without this parameter will not change disk size of the VPS. The disk size of VPS cannot be lowered. To downgrade VPS plan the VPS disk size must be lower or equal to the disk size of target VPS plan.
|Error code||HTTP response code||Description|
|1||400 (Bad request)||Function was not performed, because all required parameters were not entered. Reply portion reply is empty.|
|3||403 (Forbidden)||Function call failed, invalid sid parameter. Create new sid using /api/login function. Reply portion reply is empty.|
|5||403 (Forbidden)||Function has not been performed, because it is probably an attempt to manipulate VPS that is not in your administration. Reply portion reply is empty.|
|9||400 (Bad request)||Function call failed, the VPS is busy processing another request.|
|11||400 (Bad request)||Function call failed, this VPS cannot be changed to this plan.|
$api->vserver_upgrade_program(array( 'vserver_id' => %vserver_id%, 'plan_id' => %plan_id%, ));
Example of data output
<?xml version="1.0" encoding="UTF-8"?> <reply> <status> <code>0</code> <text>OK</text> </status> </reply>