Description
The function allows to get information about all hosts in SiteBuilder. The information includes the following: host name, host state (active/not active), host's range, host IP address, host owner name, number of resellers assigned to this host.
Synopsis
Name of the script to call
[SiteBuilderHost]/remote_admin/ipmanager.php
Login:password for accessing the directory
Login: Root
Password: Reseller
Parameters
cmd=get_hosts
Result
The result string has the following format:<RESULT_ACTION><RESULT NAME="Name">Result</RESULT><STATUS CODE="Status Code">Status string</STATUS></RESULT_ACTION>
Status string - a string containing information on the result of the function including description of an error if it has occurred during execution of the function. Status string always contains a value.
Name - the name of the returning value. If no errors have occurred during execution of the function, then Name = 'hosts', else Name is empty.
Status code - a 6-digits number containing code of the result of the function, i.e. error code or code of successful completion of the function. Status code always contains a value.
Result - the returning value. If some errors have occurred during execution of the function, then Result is empty, else if the function has been completed successfully Result contains an XML-format string, where each host is described with a tag: <HOST HOST_NAME="Host_Name" ACTIVE="Host_Active" RANGE="Host_Range" IP_ADDRESS="Host_Ip_Address" OWNER="Owner" [ RESELLERS="Number_of_resellers" ] />Host_Name - Host nameHost_Active – State (1 – active, 0 - not active)Host_Range - Host's range(1 - yes, 0 - no)Host_Ip_Address - IP address(es) of host(s)Owner - Owner of this hostNumber_of_resellers - Number of resellers assigned to this host. This attribute is available only for Root
Example
Command[SiteBuilderHost]/remote_admin/ipmanager.php?cmd=get_hosts
Result
<RESULT_ACTION><RESULT NAME="hosts"><HOST HOST_NAME="127.0.0.1" ACTIVE="1" RANGE="0" IP_ADDRESS="127.0.0.1" OWNER="rss" RESELLERS="none" /><HOST HOST_NAME="192.168.47.31" ACTIVE="1" RANGE="0" IP_ADDRESS="192.168.47.31" OWNER="root" RESELLERS="4" /><HOST HOST_NAME="range(192.168.47.1-10)" ACTIVE="1" RANGE="1" IP_ADDRESS="192.168.47.1 - 192.168.47.10" OWNER="rss" RESELLERS="none" /><HOST HOST_NAME="192.168.0.1" ACTIVE="1" RANGE="0" IP_ADDRESS="192.168.0.1" OWNER="root" RESELLERS="2" /></RESULT><STATUS CODE="060023">OK</STATUS></RESULT_ACTION>
The function allows to get the following information about the Host: host name, host status (active/not active), host ip range, host ip, host owner, number of resellers, and reseller login.
Synopsis
Name of the script to call
[SiteBuilderHost]/remote_admin/ipmanager.php
Login:password for accessing the directory
Login: Root
Password: Reseller
Parameters
cmd=get_host_details
sbra_hosts=host_name
Result
The result string has the following format:
<RESULT_ACTION><RESULT NAME="Name">Result</RESULT><STATUS CODE="Status Code">Status string</STATUS></RESULT_ACTION>
Status string - a string containing information on the result of the function including description of an error if it has occurred during execution of the function. Status string always contains a value.
Name - the name of the returning value. If no errors have occurred during execution of the function, than Name = 'host_details', else Name is empty.
Status code - a 6-digits number containing code of the result of the function, i.e. error code or code of successful completion of the function. Status code always contains a value.
Result - the returning value. If some errors have occurred during execution of the function, than Result is empty, else if the function has been completed successfully Result contains an XML-format string, where host is described with a tag: <HOST
HOST_NAME="Host_Name"
ACTIVE="Host_Active"
RANGE="Host_Range"
IP_ADDRESS="Host_Ip_Address"
OWNER="Owner"
[ RESELLERS="Number_of_resellers" ]>
[
<RESELLER LOGIN="reseller_login" />
<RESELLER LOGIN="reseller_login" />
...
<RESELLER LOGIN="reseller_login" />
]
</HOST>Host_Name - Host nameHost_Active – State (1 – active, 0 - not active)Host_Range - Host's range (1 - yes, 0 - no)Host_Ip_Address - IP address(es) of host(s)Owner - Owner of this hostNumber_of_resellers - Number of resellers assigned to this host. This attribute is available only for Root reseller_login - Login of the reseller assigned to the host. This attribute is available only for Root
Example
Command[SiteBuilderHost]/remote_admin/ipmanager.php?cmd=get_host_details&sbra_hosts=ya.ru
Result<RESULT_ACTION><RESULT NAME="host_details"><HOST HOST_NAME="ya.ru" ACTIVE="1" RANGE="0" IP_ADDRESS="213.180.204.8" OWNER="root" RESELLERS="1" ><RESELLER LOGIN="bbb" /></HOST></RESULT><STATUS CODE="060023">OK</STATUS></RESULT_ACTION>
Description
The function allows to delete one or several hosts.
Synopsis
Name of the script to call
[SiteBuilderHost]/remote_admin/ipmanager.php
Login:password for accessing the directory
Login: Root
Password: Reseller
Parameters
cmd=delete
sbra_hosts=host name[,host name]
Result
The result string has the following format:<RESULT_ACTION><RESULT NAME="Name">Result</RESULT><STATUS CODE="Status Code">Status string</STATUS></RESULT_ACTION>
In the case of the Delete host function, the result string doesn't contain any values. It returns only status message.
Example
Command[SiteBuilderHost]/remote_admin/ipmanager.php?cmd=delete&sbra_hosts=range(192.168.47.40-60),192.168.47.31
Result<RESULT_ACTION><RESULT NAME=""></RESULT><STATUS CODE="060029">2 host(s) have been deleted.</STATUS></RESULT_ACTION>
Description
The function allows to activate one or several hosts.
Synopsis
Name of the script to call
[SiteBuilderHost]/remote_admin/ipmanager.php
Login:password for accessing the directory
Login: Root
Password: Reseller
Parameters
cmd=activate
sbra_hosts=host name[,host name]
Result
The result string has the following format:<RESULT_ACTION><RESULT NAME="Name">Result</RESULT><STATUS CODE="Status Code">Status string</STATUS></RESULT_ACTION>
In the case of the Activate host function, the result string doesn't contain any values. It returns only status message.
Example
Command[SiteBuilderHost]/remote_admin/ipmanager.php?cmd=activate&sbra_hosts=range(192.168.47.40-60),192.168.47.31
Result<RESULT_ACTION><RESULT NAME=""></RESULT><STATUS CODE="060026">2 host(s) have been activated.</STATUS></RESULT_ACTION>
Description
The function allows to deactivate one or several hosts.
Synopsis
Name of the script to call
[SiteBuilderHost]/remote_admin/ipmanager.php
Login:password for accessing the directory
Login: Root
Password: Reseller
Parameters
cmd=deactivate
sbra_hosts=host name[,host name]
Result
The result string has the following format:<RESULT_ACTION><RESULT NAME="Name">Result</RESULT><STATUS CODE="Status Code">Status string</STATUS></RESULT_ACTION>
In the case of the Deactivate host function, the result string doesn't contain any values. It returns only status message.
Example
Command[SiteBuilderHost]/remote_admin/ipmanager.php?cmd=deactivate&sbra_hosts=range(192.168.47.40-60),192.168.47.31
Result<RESULT_ACTION><RESULT NAME=""></RESULT><STATUS CODE="060027">2 host(s) have been deactivated.</STATUS></RESULT_ACTION>
Description
The function allows to retrieve one or several hosts.
Synopsis
Name of the script to call
[SiteBuilderHost]/remote_admin/ipmanager.php
Login:password for accessing the directory
Login: Root
Password: Reseller
Parameters
cmd=retrieve
sbra_hosts=host name[,host name]
Result
The result string has the following format:<RESULT_ACTION><RESULT NAME="Name">Result</RESULT><STATUS CODE="Status Code">Status string</STATUS></RESULT_ACTION>
In the case of the Retrieve host function, the result string doesn't contain any values. It returns only status message.
Example
Command[SiteBuilderHost]/remote_admin/ipmanager.php?cmd=retrieve& sbra_hosts=mdk10test1.sbts.plesk.ru,10.55.57.34,10.55.57.36
Result<RESULT_ACTION><RESULT NAME=""></RESULT><STATUS CODE="060033">3 host(s) have been updated.</STATUS></RESULT_ACTION>
Description
The function allows to create FTP host.
Synopsis
Name of the script to call
[SiteBuilderHost]/remote_admin/ipmanager.php
Login:password for accessing the directory
Login: Root
Password: Reseller
Parameters
cmd=add_host
sb_ftp_host=hostsb_active=1 | (0 | unset) 1 - the Host is active, 0|unset - the Host is not active.
Result
The result string has the following format:<RESULT_ACTION><RESULT NAME="Name">Result</RESULT><STATUS CODE="Status Code">Status string</STATUS></RESULT_ACTION>
In the case of the Add FTP host function, the result string doesn't contain any values. It returns only status message.
Example
Command[SiteBuilderHost]/remote_admin/ipmanager.php?cmd=add_host&sb_ftp_host=10.55.57.36&sb_active=1
Result<RESULT_ACTION><RESULT NAME=""></RESULT><STATUS CODE="060004">Host has been created.</STATUS></RESULT_ACTION>
Description
The function allows to change the following host parameters:host name and host status (active/no active).
Synopsis
Name of the script to call
[SiteBuilderHost]/remote_admin/ipmanager.php
Login:password for accessing the directory
Login: Root
Password: Reseller
Parameters
cmd=update_host | (0 | unset) 1 - the Host is active, 0|unset - the Host is not active
sbra_hosts=old host name
sb_ftp_host=new host name
sb_active=1
Result
The result string has the following format:<RESULT_ACTION><RESULT NAME="Name">Result</RESULT><STATUS CODE="Status Code">Status string</STATUS></RESULT_ACTION>
In the case of the Edit FTP host details function the result string doesn't contain any values. It returns only status message.
Example
Command[SiteBuilderHost]/remote_admin/ipmanager.php?cmd=update_host&sbra_hosts=10.55.57.36 &sb_ftp_host=10.55.57.34&sb_active=1
Result<RESULT_ACTION><RESULT NAME=""></RESULT><STATUS CODE="060009">Host has been updated.</STATUS></RESULT_ACTION>
Description
The function allows to create a range of host IPs.
Synopsis
Name of the script to call
[SiteBuilderHost]/remote_admin/ipmanager.php
Login:password for accessing the directory
Login: Root
Password: Reseller
Parameters
cmd=add_host_range | (0 | unset) 1 - the Host Range is active, 0|unset - the Host Range is not active.
sb_ftp_host_fst=First IP in range
sb_ftp_host_sec=Last IP in range
sb_active=1
Result
The result string has the following format:<RESULT_ACTION><RESULT NAME="Name">Result</RESULT><STATUS CODE="Status Code">Status string</STATUS></RESULT_ACTION>
In the case of the Add hosts range function the result string doesn't contain any values. It returns only status message.
Example
Command
[SiteBuilderHost]/remote_admin/ipmanager.php?cmd=add_host_range&sb_ftp_host_fst=10.55.57.36 &sb_ftp_host_sec=10.55.57.40&sb_active=1
Result<RESULT_ACTION><RESULT NAME=""></RESULT><STATUS CODE="060004">Host has been created.</STATUS></RESULT_ACTION>
Description
The function allows to change the following host's range parameters: host's range name, first IP host's range, last IP host's range, host's range status (active/not active).
Synopsis
Name of the script to call
[SiteBuilderHost]/remote_admin/ipmanager.php
Login:password for accessing the directory
Login: Root
Password: Reseller
Parameters
cmd=update_host_range | (0 | unset) 1 - the Host Range is active, 0|unset - the Host Range is not active.
sbra_hosts_range_name=Host's range name
sb_ftp_host_fst=First IP host's range
sb_ftp_host_sec=Last IP host's range
sb_active=1
Result
The result string has the following format:
<RESULT_ACTION><RESULT NAME="Name">Result</RESULT><STATUS CODE="Status Code">Status string</STATUS></RESULT_ACTION>
In the case of the Edit host's range details function the result string doesn't contain any values. It returns only status message.
Example
Command[SiteBuilderHost]/remote_admin/ipmanager.php?cmd=update_host_range&sbra_hosts_range_name= range(192.168.0.1-15)&sb_ftp_host_fst=192.168.0.15&sb_ftp_host_sec=192.168.0.25
Result<RESULT_ACTION><RESULT NAME=""></RESULT><STATUS CODE="060009">Host has been updated.</STATUS></RESULT_ACTION>
Description
The function allows to assign resellers to the host.
Synopsis
Name of the script to call
[SiteBuilderHost]/remote_admin/ipmanager.php
Login:password for accessing the directory
Login: Root
Password: Reseller
Parameters
cmd=assign_resellers
sbra_hosts=host name
sb_resellers=reseller login[,reseller login]
Result
The result string has the following format:<RESULT_ACTION><RESULT NAME="Name">Result</RESULT><STATUS CODE="Status Code">Status string</STATUS></RESULT_ACTION>
In the case of the Assign resellers to host function the result string doesn't contain any values. It returns only status message.
Example
Command[SiteBuilderHost]/remote_admin/ipmanager.php?cmd=assign_resellers&sbra_hosts=192.168.47.31&sb_resellers=rss,new
Result<RESULT_ACTION><RESULT NAME=""></RESULT><STATUS CODE="060009">Host has been updated.</STATUS></RESULT_ACTION>
Description
The function allows to remove resellers from the host.
Synopsis
Name of the script to call
[SiteBuilderHost]/remote_admin/ipmanager.php
Login:password for accessing the directory
Login: Root
Password: Reseller
Parameters
cmd=deassign_resellers
sbra_hosts=host name
sb_resellers=reseller login[,reseller login]
Result
The result string has the following format:<RESULT_ACTION><RESULT NAME="Name">Result</RESULT><STATUS CODE="Status Code">Status string</STATUS></RESULT_ACTION>
In the case of the Deassign resellers to host function the result string doesn't contain any values. It returns only status message.
Example
Command[SiteBuilderHost]/remote_admin/ipmanager.php?cmd=deassign_resellers&sbra_hosts=192.168.47.31&sb_resellers=rss,new
Result<RESULT_ACTION><RESULT NAME=""></RESULT><STATUS CODE="060009">Host has been updated.</STATUS></RESULT_ACTION>