vserver_vnc_setting ()
Changes password for VNC and toggles VNC active or inactive.
HTTP Method: | GET | |
---|---|---|
Parameters: | sid | session id* |
vserver_id | unique id of VPS* | |
HTTP Method: | POST | |
Parameters: | vnc_password | new password (if parameter is empty the VNC will be set inactive) |
weak | disable (0) or enable (1) weak password (if parameter is empty, set as 0 by default) | |
Returns: | HTTP code | 200 (OK) |
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 "https://admin.hosting90.eu/api/vserver_vnc_setting?sid=%sid%&vserver_id=%vserver_id%"
PHP Library
$api->vserver_vnc_setting(array(
'vserver_id' => %vserver_id%,
'vnc_password' => %vnc_password%,
));
Example of data output
<?xml version="1.0" encoding="UTF-8"?>
<reply>
<status>
<code>1</code>
<text>Bad parameters GET (required: sid, vserver_id), POST (required: vnc_password; optional: weak //set to 1 enable weak password//)</text>
</status>
</reply>