vserver_image_restore ()
This function restores VPS from a template.
Target VPS content will be overwritten by the template and then turned off. All data on the target VPS will be lost!
HTTP Method: | GET | |
---|---|---|
Parameters: | sid | session id* |
vserver_id | unique id of VPS* | |
image_id | unique id of image* | |
Returns: | HTTP code | 200 (OK) |
Function call successful. Reply portion reply is empty. |
Return errors
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 selected VPS is busy processing another request. |
10 | 400 (Bad request) | Function call failed, the selected VPS is in state preventing this action. |
11 | 400 (Bad request) | Function call failed, this template cannot be restored to a VPS in this plan. |
CURL
curl "https://admin.hosting90.eu/api/vserver_image_restore?sid=%sid%&vserver_id=%vserver_id%&image_id=%image_id%"
PHP Library
$api->vserver_image_restore(array(
'vserver_id' => %vserver_id%,
'image_id' => %image_id%,
));
Example of data output
<?xml version="1.0" encoding="UTF-8"?>
<reply>
<status>
<code>0</code>
<text>Image restore started</text>
</status>
</reply>