vserver_change_custom_name ()
This function changes name of your VPS. Note that this does not change internal name returned by /api/vserver_list but only name displayed to the user in client section.
HTTP Method: | GET | |
---|
Parameters: | sid | session id |
---|
| vserver_id | unique id of VPS |
HTTP Method: | POST | |
---|
Parameters: | custom_name | new VPS name |
---|
Returns: | HTTP code | 200 (OK) |
---|
| | Name changed. 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.
|
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"custom_name=%custom_name%" "https://admin.hosting90.eu/api/vserver_change_custom_name?sid=%sid%&vserver_id=%vserver_id%"
PHP Library
$api->vserver_change_custom_name(
array(
'vserver_id' => %vserver_id%,
),
array(
'custom_name' => %custom_name%,
)
);
Example of data output
<?xml version="1.0" encoding="UTF-8"?>
<reply>
<status>
<code>0</code>
<text>Custom name changed</text>
</status>
</reply>