vserver_set_nwfilter ()
This function set nwfilters for specified VPS.
HTTP Method: | GET | |
---|---|---|
Parameters: | sid | session id* |
vserver_id | unique id of VPS* | |
enable | 1 - IP filter enabled; 0 - IP filter disabled; -1 - MAC filter disabled* | |
Returns: | HTTP code | 200 (OK) |
nwfilter is enabled/disabled. Reply portion reply is empty. |
This function is available only for customers with own network range.
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 has not been performed, because it is probably an attempt to manipulate VPS that is not in your administration. Reply portion reply is empty. |
9 | 400 (Bad request) | Function call failed, VPS locked in processing. Reply portion reply is empty. |
CURL
curl "https://admin.hosting90.eu/api/vserver_set_nwfilter?sid=%sid%&vserver_id=%vserver_id%&enable=%enable%"
PHP Library
$api->vserver_set_nwfilter(array(
'vserver_id' => %vserver_id%,
'enable' => %enable%,
));
Example of data output
<?xml version="1.0" encoding="UTF-8"?>
<reply>
<status>
<code>0</code>
<text>OK</text>
</status>
</reply>