vserver_virtualization_parameters ()
This function changes virtualization parameters of a VPS.
| HTTP Method: | GET | |
|---|---|---|
| Parameters: | sid | session id* |
| vserver_id | unique id of VPS* | |
| HTTP Method: | POST | |
| Parameters: | rtc | RTC time zone** |
| hdd_mode | hard disk mode (virtio, ide, scsi)** | |
| watchdog | watchdog (none, i6300esb)** | |
| graphics | graphics card (cirrus, vga, qxl)** | |
| display_type | remote display protocol type(vnc, spice)** | |
| network |
network card (virtio, e1000, rtl8139)** | |
| Returns: | HTTP code | 200 (OK) |
| Function call successful. Reply portion reply is empty. |
Parameters marked with * are mandatory
Parameters marked with ** are optional at least one of them has to be set though
Parameters marked with ** are optional at least one of them has to be set though
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. |
| 4 | 400 (Bad request) | Function call failed, some parameter(s) have invalid value (e.g. contains invalid characters. Reply portion reply specifies invalid parameters. |
| 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. |
CURL
curl -d"hdd_mode=%hdd_mode%&network=%network%" "https://admin.hosting90.eu/api/vserver_virtualization_parameters?sid=%sid%&vserver_id=%vserver_id%"
PHP Library
$api->vserver_virtualization_parameters(
array(
'vserver_id' => %vserver_id%,
),
array(
'hdd_mode' => %hdd_mode%,
'network' => %network%
)
);
Example of data output
<?xml version="1.0" encoding="UTF-8"?>
<reply>
<status>
<code>0</code>
<text>Parameters updated</text>
</status>
</reply>