terahz
1x10^12 Hz
Hi guys,
I had a chance to play with an apex recently and wanted to see what is the API that their smartphone apps use, but couldn't find anything. Decided to poke here and there and this is what I got:
It is basically a regular CGI interface that returns XML most of the time. The reading part is done via the XML output from the XML menu in the web page (all called via http://apex_address/cgi-bin/<filename>):
status.xml -> returns XML with basic time & date info, serial, version and a list of all your probes and outlets
datalog.xml -> returns the log (doh!). Supports arguments sdate=<unix seconds> and days=<int>. This along with outlog.xml are explained in the in depth guide. Week/month/year also work as arguments but the unit I played with didn't have that much data so I couldn't figure out if they return the last X week/month/years or something else.
abdump.xml -> returns info on modules like address, hw/sw revision and some more
threads.xml -> returns the various event handles and their state
Setting things remotely seems to work via the status.sht script. This script is not in the cgi-bin directory and is essentially the 'Old Status' page under Dashboard. To toggle the state of an outlet you pass <outlet_name>_state=<state number>, where <state number> is 0 (Auto), 1 (Off) and 2 (On). So if your apex URL is http://apex/ turning on an outlet called SumpLight would look like this in the browser:
http://apex/status.sht?SumpLight_state=2
Feeding modes are also activated using status.sht. To turn on feeding you pass FeedSel=<number> and FeedCycle=Feed, where numbers 0-3 correspond to A-D.
Canceling Feeding uses FeedCancel=Feed Cancel (notice the space. Usually passed as %20).
To use the above example, turning on Feed D:
http://apex/status.sht?FeedSel=2&FeedCycle=Feed
And to cancel it:
http://apex/status.sht?FeedCycle=Feed Cancel
And that's pretty much it, as far as I can tell. Hope it is useful to someone.
I had a chance to play with an apex recently and wanted to see what is the API that their smartphone apps use, but couldn't find anything. Decided to poke here and there and this is what I got:
It is basically a regular CGI interface that returns XML most of the time. The reading part is done via the XML output from the XML menu in the web page (all called via http://apex_address/cgi-bin/<filename>):
status.xml -> returns XML with basic time & date info, serial, version and a list of all your probes and outlets
datalog.xml -> returns the log (doh!). Supports arguments sdate=<unix seconds> and days=<int>. This along with outlog.xml are explained in the in depth guide. Week/month/year also work as arguments but the unit I played with didn't have that much data so I couldn't figure out if they return the last X week/month/years or something else.
abdump.xml -> returns info on modules like address, hw/sw revision and some more
threads.xml -> returns the various event handles and their state
Setting things remotely seems to work via the status.sht script. This script is not in the cgi-bin directory and is essentially the 'Old Status' page under Dashboard. To toggle the state of an outlet you pass <outlet_name>_state=<state number>, where <state number> is 0 (Auto), 1 (Off) and 2 (On). So if your apex URL is http://apex/ turning on an outlet called SumpLight would look like this in the browser:
http://apex/status.sht?SumpLight_state=2
Feeding modes are also activated using status.sht. To turn on feeding you pass FeedSel=<number> and FeedCycle=Feed, where numbers 0-3 correspond to A-D.
Canceling Feeding uses FeedCancel=Feed Cancel (notice the space. Usually passed as %20).
To use the above example, turning on Feed D:
http://apex/status.sht?FeedSel=2&FeedCycle=Feed
And to cancel it:
http://apex/status.sht?FeedCycle=Feed Cancel
And that's pretty much it, as far as I can tell. Hope it is useful to someone.