Rest API allows users to integrate their sensor data into 3rd party applications.
API calls can be made from programming language of your choice. Responses are served as either XML(Extensible Markup Language) or JSON (JavaScript Object Notation).
Overuse could result in revocation of API portal.
Overuse Example: making the same call more often than the data is updated (Datamessage Methods: 1 request per 10 minutes).
Please utilize the webhook for real time Datamessages.
*All Dates are in UTC (Universal Coordinated Time) both for the input and for the output.
*To request a larger data load, Please contact support
Authorization
APIs use authorization to ensure that client requests access data securely.
The APIKeyID and the APISecretKey both need to be included as headers in the posted request.
Click Api Keys to get your API keys.
Parameters
Our parameters will need to be passed in the request as Param entries. The Parameter name will be set as the Key and the parameter value will be set as the Value .
Select API Type
Lookup
Account
Network
Gateway
Sensor
Sensor Group
Data Message
Notification
Advanced Notification
Webhook
Method: SensorRecentDataMessages
Returns data points recorded in a range of time (limited to a 1 day window)
*Maximum of 5000 Datapoints returned.
This service is changing! "lastMessgeID" is deprecated. It will be replaced with "lastDataMessageGUID" by July 2016.
Parameters
sensorID:
Integer
Unique identifier of the sensor
minutes:
Integer
Number of minutes past messages will be returned
lastDataMessageGUID:
GUID (optional)
Only return messages received after this message ID
Example
Example Output
<?xml version="1.0" encoding="utf-8"?>
<SensorRestAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Method>SensorRecentDataMessages</Method>
<Result xsi:type="xsd:string">
<APIDataMessageList>
<APIDataMessage SensorID="101" MessageDate="1/1/2011 6:36:00 PM" State="0" SignalStrength="-36" Voltage="3.1" Battery="100" Data="30" DisplayData="86° F" PlotValue="86" MetNotificationRequirements="False" GatewayID="1234"/>
<APIDataMessage SensorID="101" MessageDate="1/1/2011 6:34:33 PM" State="0" SignalStrength="-36" Voltage="3.1" Battery="100" Data="50" DisplayData="122° F" PlotValue="122" MetNotificationRequirements="False" GatewayID="1234"/>
</APIDataMessageList>
</Result>
</SensorRestAPI>
Method: SensorChartMessages
Returns chartable data points recorded in a range of time
Interval Sensors: (Temperature, Humidity, etc) datapoints with in the given range.
Active ID Sensors: return the number of recorded checkins by date.
Triggered Sensors: (Open/Closed,Water, etc) return a count by date of the messages that were in the "Aware" state.
*Maximum of 75 Datapoints returned. If dataset returns more than 75 datapoints every n
th datapoint (Calculated by Modulous of total datapoints divided by 75) is returned.
Parameters
sensorID:
Integer
Unique identifier of the sensor
fromDate:
Date
Start of range from which messages will be returned
toDate:
Date
End of range from which messages will be returned
Example
Example Output
<?xml version="1.0" encoding="utf-8"?>
<SensorRestAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Method>SensorChartMessages</Method>
<Result xsi:type="xsd:string">
<APIChartDataPointList>
<APIChartDataPoint Date="1/1/2011 6:36:00 PM" Value="30" SentNotification="True"/>
<APIChartDataPoint Date="1/1/2011 6:34:33 PM" Value="50" SentNotification="True"/>
</APIChartDataPointList>
</Result>
</SensorRestAPI>
Method: WebHookAttemptBody
Returns Body of specified Attempt
Parameters
accountID:
Integer (optional)
Unique identifier of SubAccount. If omitted, Your default account will be used.
attemptID:
Integer
Unique identifier of Attempt to resend
Example
Example Output
&<SensorRestAPI>
<Method>APIWebHookAttemptBody</Method>
<Result xsi:type="xsd:collection">
<APIWebHookAttemptBody Body="{"gatewayMessage":{ "gatewayID":"xxxx" , "gatewayName":"USB+Service+-+xxxx" , "accountID":"x", "networkID":"xxxx" , "messageType":"0" , "power":"0", "batteryLevel": "101" , "date": "2016-04-04 20:29:47", "count":"1", "signalStrength": "0", "pendingChange": "False" }}"/>>
</Result>
</SensorRestAPI>