This API can be used to get the current uptime status and response time of all the monitors in an account.
Sample Request
Below is a sample request for viewing the current uptime status and response time of all monitors:
XML: http://site24x7.com/api/xml/currentstatus?apikey=[APIKEY]
|
For example,
http://site24x7.com/api/xml/currentstatus?apikey=f98394a9538975fe3ba18e1501e3ecb1
|
Sample Success Response
Below is a sample success response in XML format:
<response uri="/api/xml/currentstatus" action="CurrentStatus"> <result> <response> <group name="me"> <monitor displayname="MyCorporate" monitortype="URL" status="Up" responsetime="6 ms"/> <monitor displayname="MyMonitor" monitortype="URL" status="Down" responsetime="3995 ms"/> </group> </response> </result> </response> |
Errors
The API returns errors if any of the parameters are wrongly specified. Below is a sample error response shown when the API key provided is incorrect.
<response uri="/api/xml/currentstatus"> <error> <code>2890</code> <message> Specified apikey [f98394a9538975fe3ba18e1501e3ecb] is not valid.Provide a correct one. </message> </error> </response> |