AlertFox includes a basic API interface to check the sensor status remotely, e. g. to combine AlertFox with 3rd party dashboards or alerting systems (for example WhatsUp Gold).
https://my.alertfox.com/api/whatsup/AF0322072/58d9/57450 (returns FAILURE as system under test is offline)
https://my.alertfox.com/api/whatsup/AF0322072/58d9/43918 (returns OK as system under test works fine)
https://my.alertfox.com/api/whatsup/AF0322072/58d9/12345 (returns NO DATA FOUND as the sensor# does not exist in the user account)
The example API URL points to sensors running in one of our test accounts. The first sensor tests a system that is currently not powered on, hence the reason the API call returns FAILURE. If the system would be up and the sensor was also yielding successful results, you would see a OK response, like with the second test. To summarize, the value returned by the API call is the status of the sensor being queried, not the status of the API itself.
It’s very easy to test this using one of your own sensors by simply replacing the relevant portions with your account specific values.
The syntax of this call is:
API URL / AccountID ("AF0322072") / secret key ("58d9") / sensorID ("57450")The result of this call is the sensor status:
OK FAILURE NO DATA FOUND (if the sensor number does not exist)
Again, easy: The key is the first four characters of your iDrone authentication token, which you find on the iDrone page in the Control center.