HTTP API functions
Previous Topic  Top  next topic

It is possible to create/update server sets, retrieve status information, and control most other functions in Simple Failover via HTTP.
This opens the possibility of creating your own web-interface to Simple Failover, and/or integrating it with your existing hosting solutions.

The data is provided in XML format for easy integration with other applications.

These HTTP functions can be accessed via the URL:
http://<IP>:<PORT>/<FUNCTION>
Replace <IP>
with the Local IP address entered in the Options dialog / General tab.
Replace <PORT>
with the port number entered in the Options dialog / General tab.
Replace <FUNCTION>
with a function name from below (extensions such as ".html" must not be added)

All functions can be accessed using either HTTP methods GET
or POST.
When using GET, all parameters must be specified in the URL.
When using POST, all parameters must be specified as form data (not in the URL).
We recommend using POST for the UpdateSS
function, and GET for all other functions.

For testing purposes, all HTTP functions are also listed and linked to from a simple web page accessible in a browser using the same URL as above, but without any function name.

General functions

Function
Description
Parameters
Returns
PauseAll
Pause all server polling (same as Pause all polling from the File menu).

-none-
(*)

Text string OK…
ResumeAll
Resume all server polling (same as Resume all polling from the File menu).

-none-
(*)

Text string OK…
TestAll
Re-test all server sets now (same as Re-test all Server Sets now from the File menu).
-none-
(*)

Text string OK…
SSList
Returns a simple server set list.
-none-
(*)

XML <SSList>
StatusList
Returns a list containing the status for each server set and each individual server.
-none-
(*)

XML <StatusList>
Log
Returns a list containing the most recent log entries.
-none-
(*)

XML <Log>
ProblemList
Returns a list of all current problems detected.
-none-
(*)

XML <ProblemList>



Individual Server Set Functions

Function
Description
Parameters
Returns
PauseSS
Pause polling of a server set (same as Pause from the Server Set menu)
ss = server set domain name
(*)


Text string OK…
ResumeSS
Resume polling of a server set (same as Resume from the Server Set menu)
ss = server set domain name
(*)


Text string OK…
TestSS
Re-test a server set immediately (same as Test now from the Server Set menu).
ss = server set domain name
(*)


Text string OK…
SSStatus
Returns the status of a server set.
ss = server set domain name
(*)


XML <SSStatus>
SSProperties
Returns the settings for a server set.
ss = server set domain name
(*)


XML <ServerSet>
DeleteSS
Delete a server set.
ss = server set domain name
(*)


Text string OK…
UpdateSS
Updates the settings for a server set or create a new server set.
data = XML <ServerSet>
(*)


Text string OK…
ServerStatus
Returns the status of an individual server.
ss = server set domain name
server
= server IP address
(*)


XML <ServerStatus>


(*)

An additional logpt
(log pass through) parameter can be used with all the HTTP functions.
The value of this parameter will simply be passed through to the Simple Failover log (including scripting) and can be anything you wish.
This can be used for example to track user IP addresses, to identify the client application, or to add comments about why certain actions were taken.
For example:
http://127.0.0.1:8201/PauseSS?ss=client.com?logpt=acct+suspended

Please note
: This feature is only available with the Professional license type.