The API of RPS is built as standard XML-RPC services. Two ways are possible to access the interface:
You can use XML-RPC libraries available on the internet.
You can send XML commands specified further down via HTTP POST using Content-Type:text/xml.
TLS/SSL is used to encrypt the communications between client and server.
User authentication is done via basic authentication using username and password.
The XML-RPC RPS service can be accessed at:
https://rps.htek.com/index.php/xmlrpc
In order to access the RPS, you need to have a valid account that you can apply for from
Htek or our local distributors.
You can redirect a specific device to a different configuration server by its MAC ID.
redirect.registerDevice(mac,serverName)
mac: MAC address you want to register to RPS
serverName: The server name you already added to RPS which the device should be redirected to
Result code: True, False
Result text:
(1) OK: If the MAC address has been registered successfully to a specific server.
(2) Errors:
Invalid MAC(s): mac → Invalid format of MAC address
Existing MAC(s): mac → The MAC address has been registered by yourself.
Error: Invalid server → Invalid server name
Are you sure you want to override MAC addresses: The MAC address has been registered by another RPS user. If you want to override it, please see more details on section 2 - redirect.registerDevice(isoverride).
<?xml version='1.0' encoding='UTF-8'?> <methodCall> <methodName>redirect.registerDevice</methodName> <params> <param> <value> <string><![CDATA[001fc1000001]]></string> </value> </param> <param> <value> <string><![CDATA[serverName]]></string> </value> </param> </params> </methodCall> |
Notes
|
<?xml version="1.0" encoding="UTF-8"?> <methodResponse xmlns:ex="http://ws.apache.org/xmlrpc/namespaces/extensions"> <params> <param> <value> <array> <data> <value> <boolean>1</boolean> </value> <value>OK</value> </data> </array> </value> </param> </params> </methodResponse> |
<?xml version="1.0" encoding="UTF-8"?> <methodResponse xmlns:ex="http://ws.apache.org/xmlrpc/namespaces/extensions"> <params> <param> <value> <array> <data> <value> <boolean>0</boolean> </value> <value>Error:Invalid MAC(s):00s1122334400</value> </data> </array> </value> </param> </params> </methodResponse> |
If the MAC address you are registering has been registered by another RPS user, you can confirm whether to override the previous registration by isOverride
parameter.
redirect.registerDevice(mac,serverName,isOverride)
mac: MAC address you want to register to RPS.
serverName: The server name you already added to RPS which the device should be redirected.
isOverride: Confirm whether to override the previous registration or not.
1: Override confirmation
0: Cancel registration
Result code: True, False
Result text:
(1) OK: If the MAC address has been registered successfully to a specific server.
(2) Errors:
Invalid MAC(s): mac → Invalid format of MAC address
Existing MAC(s): mac → The MAC address has been registered by yourself.
Error: Invalid server → Invalid server name
Only 0 or 1 can be used:1 to override, 0 to cancel → Invalid isOverride value
MAC address(es) overriding failed → Failed to override the previous MAC address
<?xml version='1.0' encoding='UTF-8'?> <methodCall> <methodName>redirect.registerDevice</methodName> <params> <param> <value> <string><![CDATA[001fc1000001]]></string> </value> </param> <param> <value> <string><![CDATA[serverName]]></string> </value> </param> <param> <value> <string><![CDATA[0]]></string> </value> </param> </params> </methodCall> |
<?xml version="1.0" encoding="UTF-8"?> <methodResponse xmlns:ex="http://ws.apache.org/xmlrpc/namespaces/extensions"> <params> <param> <value> <array> <data> <value> <boolean>1</boolean> </value> <value>OK</value> </data> </array> </value> </param> </params> </methodResponse> |
<?xml version="1.0" encoding="UTF-8"?> <methodResponse xmlns:ex="http://ws.apache.org/xmlrpc/namespaces/extensions"> <params> <param> <value> <array> <data> <value> <boolean>0</boolean> </value> <value>Error:Invalid MAC(s):00s1122334400</value> </data> </array> </value> </param> </params> </methodResponse> |
You can remove a specific device from RPS by deregistering its MAC address.
redirect.deRegisterDevice(mac)
mac: MAC address you would like to remove from RPS
Result code: True, False
Result text:
(1) OK: If the MAC address has been deregistered successfully.
(2) Error:
Invalid MAC(s): mac → Invalid
<?xml version='1.0' encoding='UTF-8'?> <methodCall> <methodName>redirect.deRegisterDevice</methodName> <params> <param> <value> <string><![CDATA[001122334401]]></string> </value> </param> </params> </methodCall> |
<?xml version="1.0" encoding="UTF-8"?> <methodResponse xmlns:ex="http://ws.apache.org/xmlrpc/namespaces/extensions"> <params> <param> <value> <array> <data> <value> <boolean>1</boolean> </value> <value>OK</value> </data> </array> </value> </param> </params> </methodResponse> |
<?xml version="1.0" encoding="UTF-8"?> <methodResponse xmlns:ex="http://ws.apache.org/xmlrpc/namespaces/extensions"> <params> <param> <value> <array> <data> <value> <boolean>0</boolean> </value> <value>Error:Invalid MAC(s):001122334401</value> </data> </array> </value> </param> </params> </methodResponse> |
You can list all the devices(MACs) that you have already registered.
redirect.listDevices()
Result code: True, False
Result text:
(1) OK:
<array> <data> <value>MAC1</value> <value>MAC2</value> … </data> </array> |
(2) Error:
No devices found → No registered devices found
<?xml version='1.0' encoding='UTF-8'?> <methodCall> <methodName>redirect.listDevices</methodName> </methodCall> |
<?xml version="1.0" encoding="UTF-8"?> <methodResponse xmlns:ex="http://ws.apache.org/xmlrpc/namespaces/extensions"> <params> <param> <value> <array> <data> <value> <boolean>1</boolean> </value> <value> <array> <data> <value></value> … </data> </array> </value> </data> </array> </value> </param> </params> </methodResponse> |
<?xml version="1.0" encoding="UTF-8"?> <methodResponse xmlns:ex="http://ws.apache.org/xmlrpc/namespaces/extensions"> <params> <param> <value> <array> <data> <value> <boolean>0</boolean> </value> <value>No device(s) exists</value> </data> </array> </value> </param> </params> </methodResponse> |
You can check if a device(MACs) is registered to RPS.
redirect.checkDevice(mac)
mac: MAC address you want to check.
Result code: True, False
Result text:
(1) OK:
Unregistered → Not assigned to a specific server.
Registered → MAC has been assigned to a specific server.
Registered Elsewhere → MAC has been registered by another RPS user.
Unknown → MAC has not been added to RPS.
(2) Error:
Invalid MAC → Invalid format of MAC address.
<?xml version='1.0' encoding='UTF-8'?> <methodCall> <methodName>redirect.checkDevice</methodName> <params> <param> <value> <string><![CDATA[001fc1000001]]></string> </value> </param> </params> </methodCall> |
<?xml version="1.0" encoding="UTF-8"?> <methodResponse xmlns:ex="http://ws.apache.org/xmlrpc/namespaces/extensions"> <params> <param> <value> <array> <data> <value> <boolean>1</boolean> </value> <value>Registered</value> </data> </array> </value> </param> </params> </methodResponse> |
<?xml version="1.0" encoding="UTF-8"?> <methodResponse xmlns:ex="http://ws.apache.org/xmlrpc/namespaces/extensions"> <params> <param> <value> <array> <data> <value> <boolean>0</boolean> </value> <value>Error:Invalid MAC(s)</value> </data> </array> </value> </param> </params> </methodResponse> |
You can register a list of devices to a different configuration server by MAC IDs.
redirect.registerDevices(macList,serverName)
mac: MAC address you want to register to RPS.
serverName: The server name you already added to RPS which the device should be redirected.
Result code: True, False
Result text:
(1) OK: If the MAC address has been registered successfully to a specific server.
(2) Errors:
Invalid MAC(s):mac → Invalid format of MAC address
Existing MAC(s):mac → The MAC address has been registered by yourself.
Error:Invalid server → Invalid server name
Are you sure you want to override MAC addresses → The MAC address has been registered by another RPS user. If you want to override it, please see more details on section 7 - redirect.registerDevices(isoverride).
<?xml version='1.0' encoding='UTF-8'?> <methodCall> <methodName>redirect.registerDevices</methodName> <params> <param> <value> <array> <data> <value> <string><![CDATA[001fc1000001]]></string> </value> <value> <string><![CDATA[001fc1000002]]></string> </value> … </data> </array> </value> </param> <param> <value> <string><![CDATA[serverName]]></string> </value> </param> </params> </methodCall> |
<?xml version="1.0" encoding="UTF-8"?> <methodResponse xmlns:ex="http://ws.apache.org/xmlrpc/namespaces/extensions"> <params> <param> <value> <array> <data> <value> <boolean>1</boolean> </value> <value> OK </value> </data> </array> </value> </param> </params> </methodResponse> |
<?xml version="1.0" encoding="UTF-8"?> <methodResponse xmlns:ex="http://ws.apache.org/xmlrpc/namespaces/extensions"> <params> <param> <value> <array> <data> <value> <boolean>0</boolean> </value> <value> Error:Invalid MAC(s):00s1122334400, ... </value> </data> </array> </value> </param> </params> </methodResponse> |
If the MAC addresses you are registering have been registered by other RPS users, you can confirm whether to override the previous registrations by isOverride
parameter.
redirect.registerDevices(macList,serverName,isOverride)
macList: MAC addresses you want to register to RPS.
serverName: The server name you already added to RPS which the device should be redirected to.
isOverride: Confirm whether to override the previous registration or not.
1: Override confirmation
0: Cancel registration
Result code: True, False
Result text:
(1) OK: If the MAC address has been registered successfully to a specific server.
(2) Errors:
Invalid MAC(s):mac → Invalid format of MAC address
Existing MAC(s):mac → The MAC address has been registered by yourself.
Error:Invalid server → Invalid server name
Only 0 or 1 can be used:1 to override, 0 to cancel → Invalid isOverride value
MAC address(es) overriding failed → Failed to override the previous MAC address
<?xml version='1.0' encoding='UTF-8'?> <methodCall> <methodName>redirect.registerDevices</methodName> <params> <param> <value> <array> <data> <value> <string><![CDATA[001fc1000001]]></string> </value> <value> <string><![CDATA[001fc1000002]]></string> </value> … </data> </array> </value> </param> <param> <value> <string><![CDATA[serverName]]></string> </value> </param> <param> <value> <string><![CDATA[0/1]]></string> </value> </param> </params> </methodCall> |
<?xml version="1.0" encoding="UTF-8"?> <methodResponse xmlns:ex="http://ws.apache.org/xmlrpc/namespaces/extensions"> <params> <param> <value> <array> <data> <value> <boolean>1</boolean> </value> <value> OK </value> </data> </array> </value> </param> </params> </methodResponse> |
<?xml version="1.0" encoding="UTF-8"?> <methodResponse xmlns:ex="http://ws.apache.org/xmlrpc/namespaces/extensions"> <params> <param> <value> <array> <data> <value> <boolean>0</boolean> </value> <value> Error:Invalid MAC(s):00s1122334400 </value> </data> </array> </value> </param> </params> </methodResponse> |
You can remove a list of s devices from RPS by deregistering these MAC addresses.
redirect.deRegisterDevices(macList)
macList: MAC addresses you would like to remove from RPS
Result code: True, False
Result text:
(1) OK: If the MAC address has been deregistered successfully.
(2) Error:
Invalid MAC(s):mac → Invalid format of MAC address or the MAC address has not been registered by you.
<?xml version='1.0' encoding='UTF-8'?> <methodCall> <methodName>redirect.deRegisterDevices</methodName> <params> <param> <value> <array> <data> <value> <string><![CDATA[001fc1000001]]></string> </value> <value> <string><![CDATA[001fc1000002]]></string> </value> … </data> </array> </value> </param> </params> </methodCall> |
<?xml version="1.0" encoding="UTF-8"?> <methodResponse xmlns:ex="http://ws.apache.org/xmlrpc/namespaces/extensions"> <params> <param> <value> <array> <data> <value> <boolean>1</boolean> </value> <value>OK</value> </data> </array> </value> </param> </params> </methodResponse> |
<?xml version="1.0" encoding="UTF-8"?> <methodResponse xmlns:ex="http://ws.apache.org/xmlrpc/namespaces/extensions"> <params> <param> <value> <array> <data> <value> <boolean>0</boolean> </value> <value>Error:Invalid MAC(s):001122334401</value> </data> </array> </value> </param> </params> </methodResponse> |
You can add a different configuration server which is used to redirected devices to.
redirect.addServer(serverName,serverUrl)
serverName: The server name you already added to RPS which the device will be redirected to.
serverUrl: The specific URL of your configuration server.
Result code: True, False
2. Result text:
(1) OK: The server has been added successfully.
(2) Errors:
The url can only begin with 'http://' or 'https://' or 'ftp://' or 'tftp://' → Invalid format of URL
The server name cannot be empty. → The serverName should not be empty.
The server url cannot be empty → The serverUrl should not be empty.
The server name has been used → The serverName has been used.
The server name can only contain 'A-z 0-9 - _ . '(include space) → Invalid format of serverName.
<?xml version='1.0' encoding='UTF-8'?> <methodCall> <methodName>redirect.addServer</methodName> <params> <param> <value> <string><![CDATA[serverName]]></string> </value> </param> <param> <value> <string><![CDATA[serverUrl]]></string> </value> </param> </params> </methodCall> |
<?xml version="1.0" encoding="UTF-8"?> <methodResponse xmlns:ex="http://ws.apache.org/xmlrpc/namespaces/extensions"> <params> <param> <value> <array> <data> <value> <boolean>1</boolean> </value> <value>OK</value> </data> </array> </value> </param> </params> </methodResponse> |
<?xml version="1.0" encoding="UTF-8"?> <methodResponse xmlns:ex="http://ws.apache.org/xmlrpc/namespaces/extensions"> <params> <param> <value> <array> <data> <value> <boolean>0</boolean> </value> <value> Error:The server name has been used </value> </data> </array> </value> </param> </params> </methodResponse> |
You can change the configuration server that the device(s) has registered to another server.
redirect.editDevice(mac,serverName)
mac: The MAC address you would like to edit.
serverName: The server name you would like to re-register the MAC to.
Result code: True, False
Result text:
(1) OK: If the MAC address has been registered successfully to a specific server.
(2) Errors:
Invalid MAC(s):mac → Invalid format of MAC address
Error:Invalid server → Invalid server name
The MAC is unknown → MAC has not been registered
Are you sure you want to override MAC addresses → The MAC address has been registered by another RPS user. If you want to override it, please see more details on section 11 - redirect.editDevice(isoverride).
<?xml version='1.0' encoding='UTF-8'?> <methodCall> <methodName>redirect.editDevice</methodName> <params> <param> <value> <string><![CDATA[001fc1000001]]></string> </value> </param> <param> <value> <string><![CDATA[serverName]]></string> </value> </param> </params> </methodCall> |
<?xml version="1.0" encoding="UTF-8"?> <methodResponse xmlns:ex="http://ws.apache.org/xmlrpc/namespaces/extensions"> <params> <param> <value> <array> <data> <value> <boolean>1</boolean> </value> <value>OK</value> </data> </array> </value> </param> </params> </methodResponse> |
<?xml version="1.0" encoding="UTF-8"?> <methodResponse xmlns:ex="http://ws.apache.org/xmlrpc/namespaces/extensions"> <params> <param> <value> <array> <data> <value> <boolean>0</boolean> </value> <value>Error:Invalid MAC(s):00s1122334400</value> </data> </array> </value> </param> </params> </methodResponse> |
If the MAC address you are registering has been registered by another RPS user, you can confirm whether to override the previous registration by isOverride parameter.
redirect.editDevice(mac,serverName,isOverride)
mac: The MAC address you would like to edit.
serverName: The server name you would like to re-register the MAC.
isOverride: Confirm whether to override the previous registration or not.
1: Override confirmation
0: Cancel registration
Result code: True, False
Result text:
(1) OK: If the MAC address has been registered successfully to a specific server.
(2) Errors:
Invalid MAC(s):mac → Invalid format of MAC address
The MAC is unknown → MAC has not been registered
Error:Invalid server → Invalid server name
Only 0 or 1 can be used:1 to override, 0 to cancel → Invalid isOverride value
MAC address(es) overriding failed → Failed to override the previous MAC address
<?xml version='1.0' encoding='UTF-8'?> <methodCall> <methodName>redirect.editDevice</methodName> <params> <param> <value> <string><![CDATA[001fc1000001]]></string> </value> </param> <param> <value> <string><![CDATA[serverName]]></string> </value> </param> <param> <value> <string><![CDATA[0]]></string> </value> </param> </params> </methodCall> |
<?xml version="1.0" encoding="UTF-8"?> <methodResponse xmlns:ex="http://ws.apache.org/xmlrpc/namespaces/extensions"> <params> <param> <value> <array> <data> <value> <boolean>1</boolean> </value> <value>OK</value> </data> </array> </value> </param> </params> </methodResponse> |
<?xml version="1.0" encoding="UTF-8"?> <methodResponse xmlns:ex="http://ws.apache.org/xmlrpc/namespaces/extensions"> <params> <param> <value> <array> <data> <value> <boolean>0</boolean> </value> <value>Error:Invalid MAC(s):00s1122334400</value> </data> </array> </value> </param> </params> </methodResponse> |