HTTP/HTTPS API
Jump to navigation
Jump to search
Introduction
All R2D2 commands can be executed remotely through HTTP or HTTPS request. By default, this access is disabled in the robot and must be active in the registry.
Syntax
The COMMAND_NAME and the arguments are the same if you are using R2D2 locally or through HTTP/HTTPS API.
http://IP_ADDRESS/cgi-bin?command=COMMAND_NAME&arg1=ARGUMENT1&arg2=ARGUMENT2
https://LOGIN:PASSWORD@IP_ADDRESS/cgi-bin?command=COMMAND_NAME&arg1=ARGUMENT1&arg2=ARGUMENT2
If a command request space character, it must be replaced by %20
Configuration
To activate this API, the registry values need to be changed. The following commands must be execute
reg add services/gsmrobotd/parameters /v HTTPListeningPort /t REG_DWORD /d 80 reg add services/gsmrobotd/parameters /v HTTPSListeningPort /t REG_DWORD /d 443 config /savenow reboot
After the reboot, you can check if the API is active with the following commands
reg query services/gsmrobotd/parameters /v HTTPListeningPort
The answer should be : HTTPListeningPort REG_DWORD 0x00000050
reg query services/gsmrobotd/parameters /v HTTPSListeningPort
The answer should be : HTTPSListeningPort REG_DWORD 0x000001BB