vserver_vlan_add ()
Create new VLAN.
HTTP Method: | GET | |
---|---|---|
Parameters: | sid | session id* |
name | VLAN name* | |
Returns: | HTTP code | 200 (OK) |
Function call successful. Reply portion reply contains ID of new VLAN. |
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. |
CURL
curl "https://admin.hosting90.eu/api/vserver_vlan_add?sid=%sid%&name=%name%"
PHP Library
$api->vserver_vlan_add(array(
'name' => %name%
));
Example of data output
<?xml version="1.0" encoding="UTF-8"?>
<reply>
<status>
<code>0</code>
<text>OK</text>
</status>
<vlan_id>5670</vlan_id>
</reply>