HTTP/HTTPS API

From IRON Test Suite
Revision as of 09:41, 21 April 2022 by Administrator (talk | contribs) (→‎Configuration)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 %

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