API

Application Programming Interface (API) is an interface which allows third party applications to communicate with the device. This page allows the administrator to log on and log off users.

API configuration

API configuration
Enable to allow only authorized third-party solution providers like ISP, and system integrators to use API for log-on and log-off process.
Default - Disabled
Allowed IP address
Add the IP addresses allowed to place the XML log-on and log-off requests.

You will be able to add IP address only if API configuration is enabled.

API explorer

Request XML string
Specify the XML content containing the configurations to enable user sign-in or sign-out.
Parse and apply
Click to parse the XML content and apply the configurations.

Sample XML request code

For all the requests, XML response will be displayed in a pop-up window.
<Request><LiveUserLogin><UserName>sophos</UserName><Password>sophos</Password><IPAddress>10.21.18.15</IPAddress><MacAddress>00:0C:29:2D:D3:AC</MacAddress> </LiveUserLogin></Request>
<Request><LiveUserLogout><Admin><UserName>admin</UserName><Password>admin</Password></Admin><UserName>sophos</UserName><IPAddress>10.21.18.15</IPAddress></LiveUserLogout></Request>

For versions prior to 10.6.1 MR-1
<Request><LiveUserLogout><UserName>sophos</UserName><IPAddress>10.21.18.15</IPAddress></LiveUserLogout></Request>
Please use the below link to use API:
https://<Sophos IP>:<port>/webconsole/APIController?reqxml=<Add the XML request here>
Note Port you mention in above URL should be same as the port you have configured as Web admin console HTTPS port from Administration > Admin settings.
For example:
https://<Sophos IP>:4444/webconsole/APIController?reqxml=<Request><LiveUserLogin><UserName>sophos</UserName><Password>sophos</Password><IPAddress>10.21.18.15</IPAddress><MacAddress>00:0C:29:2D:D3:AC</MacAddress></LiveUserLogin></Request>
Note When the user logs on using API, the client type of the users will display API client on the Live users page.