To call any of the API functions, the first call needs to be Login. This is done by sending a POST request to /user/login
with your AlertSite login email and password in the XML request body. The XML response will indicate if the login was successful.
You need to log in only once. All subsequent API calls within your code can then be made without additional Login requests.
Request URL
Request Body
XML
<Login>
<Login>[email protected]</Login>
<Password>pa55w0rd</Password>
</Login>
Response Body
On success, the operation returns an XML response Status
0 and the session ID:
XML
<Response>
<Status>0</Status>
<Message>No errors.</Message>
<SessionID>a0c54cd5628ea899</SessionID>
<ObjDevice></ObjDevice>
<ObjCust>24567</ObjCust>
<Custid>C24567</Custid>
<Company>WidgetWorld</Company>
<CurrPlan></CurrPlan>
<CurrInterval></CurrInterval>
<AvailablePlans>DEJAURL15:2:1,DEJAURL30:1:1,DEJAURL5:3:2</AvailablePlans>
<TxnOut></TxnOut>
</Response>
As for any of the XML responses to any of the other API calls, there will always be the <Status>
and <Message>
tags present in the XML. If Status
0 is returned, no errors occurred (such as invalid user, or in the case of adding a new monitor, insufficient credits). On Status
0, a <SessionID>
is given. This is a unique session ID that will be needed to authorize subsequent API calls.
<CurrPlan>
, <CurrInterval>
, and <AvailablePlans>
are not used in the XML API, but are reserved for future use.