vserver_vlan_member_add ()
This function add VPS to specific VLAN.
HTTP Method: | GET | |
---|
Parameters: | sid | session id* |
---|
| vserver_id | unique id of VPS* |
| vlan_id | unique id of VLAN* |
Returns: | HTTP code | 200 (OK) |
---|
| | Function call successful. Reply portion reply contains MAC address of new NIC on VPS. |
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 call failed, you are probably trying to manipulate VLAN that is not under your account. Reply portion reply is empty.
|
8 | 400 (Bad request) | Function call failed, this VPS is already member of this VLAN. |
CURL
curl "https://admin.systems90.cz/api/vserver_vlan_member_add?sid=%sid%&vserver_id=%vserver_id%&vlan_id=%vlan_id%"
PHP Library
$api->vserver_vlan_member_add(array(
'vserver_id' => %vserver_id%,
'vlan_id' => %vlan_id%,
));
Example of data output
<?xml version="1.0" encoding="UTF-8"?>
<reply>
<status>
<code>0</code>
<text>OK</text>
</status>
<mac_address>06:00:00:5E:cf:30</mac_address>
</reply>