Rest API

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).

*All Dates are in UTC (Universal Coordinated Time) both for the input and for the output.

API End-Point

Base API Url Explained

Base: Protocol://Host/ResponseType/Method/AuthorizationToken?Parameters
Protocol https Our online api only support https for 256 bit ssl encryption or http for non encrypted communication
Host www.imonnit.com Web host domain or resoved IPAddress
ResponseType [xml | json | jsonp] xml or json
Method [method name] Name of the method to call
AuthorizationToken [authorization token] authorization token that identifies you to the server.

Example

https://www.imonnit.com/xml/Logon/Z3Vlc3Q6cGFzc3dvcmQ=

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>Logon</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>
Authentication

GetAuthToken

Method: GetAuthToken
*Special Case: No Authorization Token Required*
Returns authorization token for username password to be used in all other api methods. This token remains valid until your password is updated in iMonnit.

Note: Authorization token is created by using base 64 encoding of "{username}:{password}" where {username} is your iMonnit username and {password} is your iMonnit password. For example "guest:password" when encoded gives us "Z3Vlc3Q6cGFzc3dvcmQ="

Parameters

Username: String Username you use to access iMonnit
Password: String Password you use to access iMonnit

Example

https://www.imonnit.com/xml/GetAuthToken?username=guest&password=password

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>GetAuthToken</Method>
  <Result xsi:type="xsd:string">Z3Vlc3Q6cGFzc3dvcmQ=</Result>
</SensorRestAPI>
Get Auth Token
Username
Password
Auth Token
Logon Result

Logon

Method: Logon
Check authorization token by calling this method

Parameters

None

Example

https://www.imonnit.com/xml/Logon/Z3Vlc3Q6cGFzc3dvcmQ=

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>Logon</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>

UpdatePassword

Method: Update Password
Updates to a new password

Parameters

NewPassword: string New password for the given account

Example

https://www.imonnit.com/xml/UpdatePassword/Z3Vlc3Qjkg6zc3dvcmQ=?newpassword=seCurep@ssw0rd

Example Outputs

<SensorRestAPI>
  <Method>UpdatePassword</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>

ResetPassword

Method: Reset Password
*Special Case: No Authorization Token Required*
Sends an email with a link to reset your password.

Parameters

Username: string Username for the given account

Example

https://www.imonnit.com/xml/ResetPassword?username=myaccount

Example Outputs

<SensorRestAPI>
  <Method>ResetPassword</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>
Lookup

TimeZones

Method: TimeZones
*Special Case: No Authorization Token Required*
Returns the list of supported timezones.

Parameters

None

Example

https://www.imonnit.com/xml/TimeZones

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>TimeZones</Method>
  <Result xsi:type="xsd:collection">
    <APINameIDList>
      <APINameID ID="1" Name="_UTC -10 – USA – Hawaii, Honolulu" />
      <APINameID ID="2" Name="_UTC -9 – USA – Alaska, Anchorage" />
      <APINameID ID="3" Name="_UTC -8 – USA – California, Los Angeles (DST)" />
      ...
    </APINameIDList>
  </Result>
</SensorRestAPI>

TimeZonesWithRegion

Method: TimeZonesWithRegion
*Special Case: No Authorization Token Required*
Returns the list of supported timezones.

Parameters

None

Example

https://www.imonnit.com/xml/TimeZonesWithRegion

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>TimeZonesWithRegion</Method>
  <Result xsi:type="xsd:collection">
    <APITimeZoneList>
      <APITimeZone ID="1" StandardName="Hawaiian Standard Time" DisplayName="USA – Hawaii, Honolulu" Region="Pacific"/>
      <APITimeZone ID="2" StandardName="Alaskan Standard Time" DisplayName="USA – Alaska, Anchorage" Region="Americas"/>
      <APITimeZone ID="3" StandardName="Pacific Standard Time" DisplayName="USA – California, Los Angeles (DST)" Region="Pacific"/>
      ...
    </APITimeZoneList>
  </Result>
</SensorRestAPI>

SMSCarriers

Method: SMSCarriers
*Special Case: No Authorization Token Required*
Returns the list of supported SMS Carriers.

Parameters

None

Example

https://www.imonnit.com/xml/SMSCarriers

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>SMSCarriers</Method>
  <Result xsi:type="xsd:collection">
    <APINameIDList>
      <APINameID ID="1" Name="Alltel" />
      <APINameID ID="2" Name="AT&T" />
      <APINameID ID="3" Name="Boost Mobile" />
      ...
    </APINameIDList>
  </Result>
</SensorRestAPI>

GetApplicationID

Method: GetApplicationID
*Special Case: No Authorization Token Required*
Returns the list of supported Application Names and Id's.

Parameters

None

Example

https://www.imonnit.com/xml/GetApplicationID

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>GetApplicationID</Method>
  <Result xsi:type="xsd:collection">
    <APINameIDList>
      <APINameID ID="1" Name="Analog Voltage" />
      <APINameID ID="2" Name="Temperature" />
      ...
    </APINameIDList>
  </Result>
</SensorRestAPI>
Account

CreateAccount

Method: CreateAccount
*Special Case: No Authorization Token Required*
Creates a new account

Parameters

CompanyName: string Company Name / Account Number used to lookup account
TimeZoneID: integer Identifier of the timezone to view sensor data
Address: string Street address for account
Address2: string (optional) Second line of street address for account
City: string City for account
State: string State or Region for account
PostalCode: string Postal Code for account
Country: string Country for account
ResellerID: Integer (optional) Identifier of reseller where hardware was purchased
UserName: string Username for primary contact to log into system
Password: string Password for primary contact to log into system
ConfirmPassword: string Confirmation of password for primary contact to log into system
FirstName: string First name of primary contact
LastName: string Last name of primary contact
NotificationEmail: string Email address of primary contact
NotificationPhone: string (optional) Cell phone number to receive sms notifications
SMSCarrierID: integer (optional) Identifier of cell phone carrier to receive sms notifications

Example

https://www.imonnit.com/xml/CreateAccount?companyName=Monnit+Test&timeZoneID=1&address=7304+South+Cottonwood&address2=Suite+204&city=SLC& state=Utah&postalCode=74047&country=USA&userName=API.Tester&password=password&confirmPassword=password&firstName=API& lastName=Tester&notificationEmail=api.tester@monnit.com

Example Outputs

<?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>CreateAccount</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>
------------------------------------------------------------------------------------------------------------------
<?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>CreateAccount</Method>
  <Result xsi:type="xsd:collection">
    <APIValidationErrorList>
      <APIValidationError Parameter="CompanyName" Error="Company name already exists"/>
      <APIValidationError Parameter="UserName" Error="Username not available"/>
    </APIValidationErrorList>
  </Result>
</SensorRestAPI>

EditAccountInformation

Method: EditAccountInformation
Edit Account Information

Parameters

accountID: long Account Number
AccountNumber: string (optional) CompanyName/Account Number used to lookup account
CompanyName: string (optional) Company Name / Account Number used to lookup account
TimeZoneID: long (optional) Identifier of the timezone to view sensor data
Address: string (optional) Street address for account
Address2: string (optional) Second line of street address for account
City: string (optional) City for account
State: string (optional) State or Region for account
PostalCode: string (optional) Postal Code for account
Country: string (optional) Country for account
BusinessTypeID: long (optional) Business Type
IndustryTypeID: long (optional) Industry Type of the Business
PrimaryContactID: long (optional) CustomerId of the customer you want to be the Primary Contact for the account.

Example

https://www.imonnit.com/xml/EditAccountInformation/Z3Vlc3Q6cGFzc3dvcmQ=?accountID=1&CompanyName=Monnit+Test&TimeZoneID=1&Address=7304+South+Cottonwood& Address2=Suite+204&City=SLC&State=Utah&PostalCode=74047&Country=USA

Example Outputs

<?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>EditAccountInformation</Method>
  <Result xsi:type="xsd:string">Successfully Saved</Result>
</SensorRestAPI>

EditCustomerInformation

Method: EditCustomerInformation
Edit Customer Information

Parameters

custID: long Customer Number
FirstName: string (optional) Customers First Name
LastName: string (optional) Customers Last Name
NotificationEmail: string (optional) Customers email to send notifications
NotificationPhone: string (optional) Customers Phone number to send notifications
SMSCarrierID: long (optional) SMS Carrier Account ID used to change carriers

Example

https://www.imonnit.com/xml/EditCustomerInformation/Z3Vlc3Q6cGFzc3dvcmQ=?custID=1&FirstName=David&NotificationPhone=8888888888

Example Outputs

<?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>EditCustomerInformation</Method>
  <Result xsi:type="xsd:string">Successfully Saved</Result>
</SensorRestAPI>

EditCustomerPermissions

Method: EditCustomerPermissions
Edit Customer Permissions

Parameters

custID: long Customer Number
: bool (optional)
: bool (optional) . NetworkID is the ID of the network you want the user to either be able to view or not view. example (Network_View_Net_123=off). you can add or remove multiple networks at the same time by using different networkIDs.
: bool (optional)
: bool (optional)
: bool (optional)
: bool (optional)
: bool (optional)
: bool (optional)
: bool (optional)
: bool (optional)
: bool (optional)
: bool (optional)
: bool (optional)
: bool (optional)
: bool (optional)
: bool (optional)
: bool (optional)
: bool (optional)
: bool (optional)
: bool (optional)
: bool (optional)
: bool (optional)
: bool (optional)
: bool (optional)
: bool (optional)
: bool (optional)
: bool (optional)
: bool (optional)
: bool (optional)
: bool (optional)
: bool (optional)
: bool (optional)

Example

https://www.imonnit.com/xml/EditCustomerPermissions/Z3Vlc3Q6cGFzc3dvcmQ=?custID=1&Customer_Create=on&Account_Edit=off

Example Outputs

    <?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>EditCustomerPermissions</Method>
  <Result xsi:type="xsd:string">Successfully Saved</Result>
</SensorRestAPI>

RetrieveUsername

Method: Retrieve Username
*Special Case: No Authorization Token Required*
Sends an email with your username to the email address provided.

Parameters

email: string Email address for the desired username.

Example

https://www.imonnit.com/xml/RetrieveUsername?email=me@mywebsite.com

Example Outputs

<SensorRestAPI>
  <Method>RetrieveUsername</Method>
  <Result xsi:type="xsd:string">Sent email to me@mywebsite.com</Result>
</SensorRestAPI>

CreateAccountUser

Method: CreateAccountUser

Parameters

UserName: string Username for primary contact to log into system
FirstName: string First name of primary contact
LastName: string Last name of primary contact
Password: string Password for primary contact to log into system
ConfirmPassword: string Confirmation of password for primary contact to log into system
NotificationEmail: string Email address of primary contact
IsAdmin: Boolean If User will have Administration abilities
Title: string (optional) Users Title (Mr,Mrs,Dr etc..)
ReceivesMaintenanceBySMS: Boolean (optional) If User will receive Maintenance informatiton by text
ReceivesMaintenanceByEmail: Boolean (optional) If User will receive Maintenance informatiton by Email
ReceivesNotificationsBySMS Boolean (optional) If User will receive Notifications by text
ReceivesNotificationsByVoice: Boolean (optional) If User will receive Notifications by Phone
NotificationPhone: string (optional) Cell phone number to receive sms notifications
NotificationPhone2: string (optional) Cell phone number to receive Voice notifications
SMSCarrierID: integer (optional) Identifier of cell phone carrier to receive sms notifications

Example

https://www.imonnit.com/xml/CreateAccountUser/Z3Vlc3Q6cGFzc3dvcmQ=?userName=Monnit+Testnew&firstName=firstname&lastName=lastname&password=password& confirmPassword=password&notificationEmail=invalid@invalid.com&isAdmin=True

Example Outputs

<?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>CreateAccountUser</Method>
  <Result xsi:type="xsd:collection">
  <APIUser UserID="1" Title="Mr" FirstName="John" LastName="Dough" EmailAddress="Invalid@invlaid.com" SMSNumber="+1 555-555-555" VoiceNumber="+1 555-555-555" DirectSMS="False" ReceivesNotificationsBySMS="False" ReceivesNotificationsByVoice="True" Active="True" Admin="True" ReceivesMaintenanceByEmail="True" ReceivesMaintenanceBySMS="False" ExternalSMSProviderID="1" UserName="JohnDoughUser"/>>
  </Result>
</SensorRestAPI>
------------------------------------------------------------------------------------------------------------------
<?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>CreateAccountUser</Method>
  <Result xsi:type="xsd:collection">
    <APIValidationErrorList>
      <APIValidationError Parameter="UserName" Error="Username not available"/>
    </APIValidationErrorList>
  </Result>
</SensorRestAPI>
Network

CreateNetwork

Method: CreateNetwork
Adds new wireless sensor network to account

Parameters

Name: String Name of network to be added

Example

https://www.imonnit.com/xml/CreateNetwork/Z3Vlc3Q6cGFzc3dvcmQ=?name=New Network Name

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>CreateNetwork</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>

CreateNetwork2

Method: CreateNetwork2
Adds new wireless sensor network to account

Parameters

Name: String Name of network to be added
ExternalAccessUntil: DateTime (optional) how long the install guide should be able to access data from that network.

Example

https://www.imonnit.com/xml/CreateNetwork2/Z3Vlc3Q6cGFzc3dvcmQ=?name=New Network Name&ExternalAccessUntil=2016/2/2

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>CreateNetwork2</Method>
  <Result xsi:type="xsd:collection">
    <APINetwork NetworkID="100" NetworkName="New Network Name" SendNotifications="True" ExternalAccessUntil="2016/2/2" />
  </Result>
</SensorRestAPI>

RemoveNetwork

Method: RemoveNetwork()
Removes the network from the system.

Parameters

networkID: Integer Unique identifier of the network

Example

https://www.imonnit.com/xml/RemoveNetwork/Z3Vlc3Q6cGFzc3dvcmQ=?networkID=1234

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>RemoveNetwork</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>

NetworkList

Method: NetworkList
Returns the list of networks that belong to user.

Parameters

None

Example

https://www.imonnit.com/xml/NetworkList/Z3Vlc3Q6cGFzc3dvcmQ=

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>NetworkList</Method>
  <Result xsi:type="xsd:collection">
    <APINetworkList>
      <APINetwork NetworkID="100" NetworkName="OfficeNetwork" SendNotifications="False" />
      <APINetwork NetworkID="300" NetworkName="Warehouse" SendNofitications="True" />
    </APINetworkList>
  </Result>
</SensorRestAPI>
Gateway

GatewayResetDefaults

Method: GatewayResetDefaults()
Removes the gateway object from the network and resets it back to factory defaults.

Parameters

gatewayID: Integer Unique identifier of the gateway

Example

https://www.imonnit.com/xml/GatewayResetDefaults/Z3Vlc3Q6cGFzc3dvcmQ=?gatewayID=001234

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>GatewayResetDefaults</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>

GatewayReform

Method: GatewayReform()
Reform updates the sensors list for the gateway and changes the channel of the gateway. .

Parameters

gatewayID: Integer Unique identifier of the gateway

Example

https://www.imonnit.com/xml/GatewayReform/Z3Vlc3Q6cGFzc3dvcmQ=?gatewayID=001234

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>GatewayReform</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>

RemoveGateway

Method: RemoveGateway()
Removes the gateway object from the network.

Parameters

gatewayID: Integer Unique identifier of the gateway

Example

https://www.imonnit.com/xml/RemoveGateway/Z3Vlc3Q6cGFzc3dvcmQ=?gatewayID=001234

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>RemoveGateway</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>

AssignGateway

Method: AssignGateway
Assigns gateway to the specified network

Parameters

NetworkID: Integer Identifier of network on your account
GatewayID: Integer Identifier of gateway to move
CheckDigit: String Check digit to prevent unauthorized movement of gateways

Example

https://www.imonnit.com/xml/AssignGateway/Z3Vlc3Q6cGFzc3dvcmQ=?networkID=2&gatewayID=100&checkDigit=AAAAAA

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>AssignGateway</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>

GatewayGet

Method: GatewayGet
Returns the gateway object.

Parameters

gatewayID: Integer Unique identifier of the gateway

Example

https://www.imonnit.com/xml/GatewayGet/Z3Vlc3Q6cGFzc3dvcmQ=?gatewayID=000101

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>GatewayGet</Method>
  <Result xsi:type="xsd:string"><APIGateway GatewayID="2599" NetworkID="100" Name="(103) gateway" GatewayType="Ethernet_Gateway" Heartbeat="5" IsDirty="False" LastCommunicationDate="1/11/2011 2:57:36 PM" LastInboundIPAddress="" MacAddress="" IsUnlocked="False" CheckDigit="XXXX" /></Result>
</SensorRestAPI>

GatewayList

Method: GatewayList
Returns the list of gateways that belongs to user.

Parameters

Name: String (optional) Filters list to gateways with names containing this string. (case-insensitive)
NetworkID: Integer (optional) Filters list to gateway that belong to this network id

Example

https://www.imonnit.com/xml/GatewayList/Z3Vlc3Q6cGFzc3dvcmQ=?name=Building
Only gateways that contain "Building" in the name are returned

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>GatewayList</Method>
  <Result xsi:type="xsd:collection">
    <APIGatewayList>
      <APIGateway GatewayID="2599" NetworkID="100" Name="Building2 (103) gateway" GatewayType="Ethernet_Gateway" Heartbeat="5" IsDirty="False" LastCommunicationDate="1/11/2011 2:57:36 PM" LastInboundIPAddress="" />
      <APIGateway GatewayID="100" NetworkID="100" Name="Building3 (Gateway) 100" GatewayType="usb" Heartbeat="5" IsDirty="False" LastCommunicationDate="2/6/2011 4:30:44 PM" LastInboundIPAddress="" />
      <APIGateway GatewayID="901" NetworkID="100" Name="WiFi Gateway(WIFI ActiveID) Building1" GatewayType="Wifi_Sensor" Heartbeat="15" IsDirty="True" LastCommunicationDate="2/6/2011 4:18:40 PM" LastInboundIPAddress="" />
    </APIGatewayList>
  </Result>
</SensorRestAPI>

GatewaySetHeartbeat

Method: GatewaySetHeartbeat
Sets the heartbeat intervals of the Gateway

Parameters

gatewayID: Integer Unique identifier of the gateway
reportInterval: Numeric Standard state heart beat

Example

https://www.imonnit.com/xml/GatewaySetHeartbeat/Z3Vlc3Q6cGFzc3dvcmQ=?GatewayID=12345&reportInterval=10

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>GatewaySetHeartbeat</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>

GatewaySetName

Method: GatewaySetName
Sets the display name of the gateway

Parameters

gatewayID: Integer Unique identifier of the gateway
gatewayName: String Name to give the gateway

Example

https://www.imonnit.com/xml/GatewaySetName/Z3Vlc3Q6cGFzc3dvcmQ=?gatewayID=101&gatewayName=MyGateway

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>GatewaySetName</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>

GatewayPoint

Method: GatewayPoint
Sets the host address and port of a gateway.

Parameters

GatewayID: Integer Unique identifier of the gateway
HostAddress: String Address of the host server.
Port: Integer Port of the host server.

Example

https://www.imonnit.com/xml/GatewayPoint/Z3Vlc3Q6cGFzc3dvcmQ=?gatewayID=12345&HostAddress=192.168.1.150&port=3000

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>GatewayPoint</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>

GatewayCellNetworkConfig

Method: GatewayCellNetworkConfig
Sets APN settings of a gateway. You may include or omit arguments as desired, except for the GatewayID.

Parameters

GatewayID: Integer Unique identifier of the gateway
CellAPNName: String APN Name for the Gateway.
Username: String APN username for the Gateway.
Password: String APN password for the Gateway.
GatewayDNS: String Primary DNS.
SecondaryDNS: String Secondary DNS.
PollInterval: Double Interval for gateway communication to keep connection open.

Example

https://www.imonnit.com/xml/GatewayCellNetworkConfig/Z3Vlc3Q6cGFzc3dvcmQ=?gatewayID=12345&PollInterval=2.1&CellAPNName=mynetwork&username=user&password=password

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>GatewayCellNetworkConfig</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>

GatewayAutoConfig

Method: GatewayAutoConfig
Sets a pending command for the gateway to go into AutoConfig Mode for the number of minutes specifies. If the number of minutes is not provided, the gateway's stored value will be used.

Parameters

gatewayID: Integer Unique identifier of the gateway
AutoConfigTime: Integer Number of minutes the gateway will be in AutoConfig mode.

Example

https://www.imonnit.com/xml/GatewayAutoConfig/Z3Vlc3Q6cGFzc3dvcmQ=?gatewayID=001234&AutoConfigTime=5

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>GatewayAutoConfig</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>

GatewayStopAutoConfig

Method: GatewayStopAutoConfig
Sets a pending command to end autoconfig mode the next time the gateway communicates with the server.

Parameters

gatewayID: Integer Unique identifier of the gateway

Example

https://www.imonnit.com/xml/GatewayStopAutoConfig/Z3Vlc3Q6cGFzc3dvcmQ=?gatewayID=001234

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>GatewayStopAutoConfig</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>

GatewayUpdateFirmware

Method: GatewayUpdateFirmware
Updates the firmware of gateway

Parameters

gatewayID: Integer Unique identifier of the gateway

Example

https://www.imonnit.com/xml/GatewayUpdateFirmware/Z3Vlc3Q6cGFzc3dvcmQ=?gatewayID=101

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>GatewayUpdateFirmware</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>
Sensor

SensorResetDefaults

Method: SensorResetDefaults()
Removes the sensor object from the network and sets the sensor back to factory defaults.

Parameters

sensorID: Integer Unique identifier of the sensor

Example

https://www.imonnit.com/xml/SensorResetDefaults/Z3Vlc3Q6cGFzc3dvcmQ=?sensorID=001234

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>SensorResetDefaults</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>

RemoveSensor

Method: RemoveSensor()
Removes the sensor object from the network.

Parameters

sensorID: Integer Unique identifier of the sensor

Example

https://www.imonnit.com/xml/RemoveSensor/Z3Vlc3Q6cGFzc3dvcmQ=?sensorID=001234

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>RemoveSensor</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>

AssignSensor

Method: AssignSensor
Assigns sensor to the specified network

Parameters

NetworkID: Integer Identifier of network on your account
SensorID: Integer Identifier of sensor to move
CheckDigit: String Check digit to prevent unauthorized movement of sensors

Example

https://www.imonnit.com/xml/AssignSensor/Z3Vlc3Q6cGFzc3dvcmQ=?networkID=2&sensorID=101&checkDigit=AAAAAA

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>AssignSensor</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>

SensorGet

Method: SensorGet
Returns the sensor object.

Parameters

sensorID: Integer Unique identifier of the sensor

Example

https://www.imonnit.com/xml/SensorGet/Z3Vlc3Q6cGFzc3dvcmQ=?sensorID=002599

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>SensorGet</Method>
  <Result xsi:type="xsd:string"><APISensor SensorID="101" MonnitApplicationID="2" CSNetID="100" SensorName="Room3_Ceiling" LastCommunicationDate="6/1/2011 4:09:41 PM" NextCommunicationDate="6/13/2011 6:11:41 PM" LastDataMessageID="1" PowerSourceID="1" Status="1" CanUpdate="True" CurrentReading="122° F" BatteryLevel="0" SignalStrength="-36" AlertsActive="True" CheckDigit="IMABCD" /></Result>
</SensorRestAPI>

SensorGetExtended

Method: SensorGetExtended
Returns the sensor object with extended Properties.

Parameters

sensorID: Integer Unique identifier of the sensor

Example

https://www.imonnit.com/xml/SensorGetExtended/Z3Vlc3Q6cGFzc3dvcmQ=?sensorID=000101

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>SensorGetExtended</Method>
  <Result xsi:type="xsd:string"><APISensorExteded ReportInterval="0" ActiveStateInterval="0" InactivityAlert="0" MeasurementsPerTransmission="0" MinimumThreshold="0" MaximumThreshold="0" Hysteresis="0" SensorID="101" MonnitApplicationID="2" CSNetID="100" SensorName="Temp 101" LastCommunicationDate="6/20/2011 6:36:23 PM" NextCommunicationDate="6/29/2011 8:38:23 PM" LastDataMessageID="230" PowerSourceID="1" Status="1" CanUpdate="True" CurrentReading="86° F" BatteryLevel="0" SignalStrength="-36" AlertsActive="False" /></Result>
</SensorRestAPI>

SensorGetCalibration

Method: SensorGetCalibration
Returns the sensor object with calibration properties.

Parameters

sensorID: Integer Unique identifier of the sensor

Example

https://www.imonnit.com/xml/SensorGetCalibration/Z3Vlc3Q6cGFzc3dvcmQ=?sensorID=000101

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>SensorGetCalibration</Method>
  <Result xsi:type="xsd:collection"><APISensorCalibration SensorID="101" MonnitApplicationID="2" CSNetID="1" SensorName="Temp 101" Calibration1="183" Calibration2="100000" Calibration3="560000" Calibration4="10000" EventDetectionType="-2147483648" EventDetectionPeriod="-2147483648" EventDetectionCount="-2147483648" RearmTime="0" BiStable="-2147483648" PushProfileConfig1="False" PushProfileConfig2="False" PushAutoCalibrateCommand="False" /></Result>
</SensorRestAPI>

SensorApplicationIDGet

Method: SensorApplicationIDGet
Returns the application identifier of the sensor.

Parameters

SensorID: interger Unique identifier of the sensor
CheckDigit: String (optional) Check Digit required if sensor not already on your account

Example

https://www.imonnit.com/xml/SensorApplicationIDGet/Z3Vlc3Q6cGFzc3dvcmQ=?sensorID=101

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>SensorApplicationIDGet</Method>
  <Result xsi:type="xsd:string">2</Result>
</SensorRestAPI>

SensorNameGet

Method: SensorNameGet
Returns the application identifier of the sensor.

Parameters

SensorID: interger Unique identifier of the sensor
CheckDigit: String (optional) Check Digit required if sensor not already on your account

Example

https://www.imonnit.com/xml/SensorNameGet/Z3Vlc3Q6cGFzc3dvcmQ=?sensorID=101

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>SensorNameGet</Method>
  <Result xsi:type="xsd:string">Temperature 101</Result>
</SensorRestAPI>

SensorList

Method: SensorList
Returns the list of sensors that belongs to user.

Parameters

Name: String (optional) Filters list to sensors with names containing this string. (case-insensitive)
NetworkID: Integer (optional) Filters list to sensor that belong to this network id
ApplicationID: Integer (optional) Filters list to sensor that are this application type
Status: Integer (optional) Filters list to sensor that match this status

Example

https://www.imonnit.com/xml/SensorList/Z3Vlc3Q6cGFzc3dvcmQ=?name=Room3&applicationID=2
Only sensors that contain "Room3" in the name are returned
Only sensors with application id 2 (temperature) are returned

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>SensorList</Method>
  <Result xsi:type="xsd:collection">
    <APISensorList>
      <APISensor SensorID="101" MonnitApplicationID="2" CSNetID="100" SensorName="Room3_Ceiling" LastCommunicationDate="6/1/2011 4:09:41 PM" NextCommunicationDate="6/13/2011 6:11:41 PM" LastDataMessageID="1" PowerSourceID="1" Status="1" CanUpdate="True" CurrentReading="122° F" BatteryLevel="0" SignalStrength="-36" AlertsActive="True" CheckDigit="IMABCD" />
      <APISensor SensorID="102" MonnitApplicationID="2" CSNetID="100" SensorName="Room3_Floor" LastCommunicationDate="1/1/2099 12:00:00 AM" NextCommunicationDate="1/1/2099 12:01:00 AM" LastDataMessageID="-9223372036854775808" PowerSourceID="1" Status="4" CanUpdate="True" CurrentReading="No Reading Available" BatteryLevel="100" SignalStrength="100" AlertsActive="True" CheckDigit="IMBCDE" />
      <APISensor SensorID="10" MonnitApplicationID="2" CSNetID="100" SensorName="Room3_Door" LastCommunicationDate="6/1/2011 5:21:08 PM" NextCommunicationDate="6/13/2011 7:23:08 PM" LastDataMessageID="218" PowerSourceID="1" Status="1" CanUpdate="False" CurrentReading="-1767.8° F" BatteryLevel="100" SignalStrength="-59" AlertsActive="True"  CheckDigit="IMDCEF" />
    </APISensorList>
  </Result>
</SensorRestAPI>

SensorListExtended

Method: SensorListExtended
Returns the list of sensors that belongs to user.

Parameters

Name: String (optional) Filters list to sensors with names containing this string. (case-insensitive)
NetworkID: Integer (optional) Filters list to sensor that belong to this network id
ApplicationID: Integer (optional) Filters list to sensor that are this application type
Status: Integer (optional) Filters list to sensor that match this status

Example

https://www.imonnit.com/xml/SensorListExtended/Z3Vlc3Q6cGFzc3dvcmQ=?name=Room3&applicationID=2
Only sensors that contain "Room3" in the name are returned
Only sensors with application id 2 (temperature) are returned

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>SensorListExtended</Method>
  <Result xsi:type="xsd:collection">
    <APISensorListExtended>
      <APISensorExteded ReportInterval="0" ActiveStateInterval="0" InactivityAlert="0" MeasurementsPerTransmission="0" MinimumThreshold="0" MaximumThreshold="0" Hysteresis="0" SensorID="101" MonnitApplicationID="2" CSNetID="100" SensorName="Room3_Ceiling" LastCommunicationDate="6/1/2011 4:09:41 PM" NextCommunicationDate="6/13/2011 6:11:41 PM" LastDataMessageID="1" PowerSourceID="1" Status="1" CanUpdate="True" CurrentReading="122° F" BatteryLevel="0" SignalStrength="-36" AlertsActive="True" />
      <APISensorExteded ReportInterval="0" ActiveStateInterval="0" InactivityAlert="0" MeasurementsPerTransmission="0" MinimumThreshold="0" MaximumThreshold="0" Hysteresis="0" SensorID="102" MonnitApplicationID="2" CSNetID="100" SensorName="Room3_Floor" LastCommunicationDate="1/1/2099 12:00:00 AM" NextCommunicationDate="1/1/2099 12:01:00 AM" LastDataMessageID="-9223372036854775808" PowerSourceID="1" Status="4" CanUpdate="True" CurrentReading="No Reading Available" BatteryLevel="100" SignalStrength="100" AlertsActive="True" />
      <APISensorExteded ReportInterval="0" ActiveStateInterval="0" InactivityAlert="0" MeasurementsPerTransmission="0" MinimumThreshold="0" MaximumThreshold="0" Hysteresis="0" SensorID="10" MonnitApplicationID="2" CSNetID="100" SensorName="Room3_Door" LastCommunicationDate="6/1/2011 5:21:08 PM" NextCommunicationDate="6/13/2011 7:23:08 PM" LastDataMessageID="218" PowerSourceID="1" Status="1" CanUpdate="False" CurrentReading="-1767.8° F" BatteryLevel="100" SignalStrength="-59" AlertsActive="True" />
    </APISensorListExtended>
  </Result>
</SensorRestAPI>

NetworkIDFromSensorGet

Method: NetworkIDFromSensorGet
Returns the network that the sensor belongs to.

Parameters

SensorID: interger Unique identifier of the sensor
CheckDigit: String (optional) Check Digit required if sensor not already on your account

Example

https://www.imonnit.com/xml/NetworkIDFromSensorGet/Z3Vlc3Q6cGFzc3dvcmQ=?sensorID=101

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>NetworkIDFromSensorGet</Method>
  <Result xsi:type="xsd:string">100</Result>
</SensorRestAPI>

SensorSetName

Method: SensorSetName
Sets the display name of the sensor

Parameters

sensorID: Integer Unique identifier of the sensor
sensorName: String Name to give the sensor

Example

https://www.imonnit.com/xml/SensorSetName/Z3Vlc3Q6cGFzc3dvcmQ=?sensorID=101&sensorName=MySensor

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>SensorSetName</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>

SensorSetHeartbeat

Method: SensorSetHeartbeat
Sets the heartbeat intervals of the sensor. Heartbeats cannot be set to lower than 10 minutes

Parameters

sensorID: Integer Unique identifier of the sensor
reportInterval: Numeric Standard state heart beat (Minimum 10 minutes)
activeStateInterval: Numeric Aware state heart beat (Minimum of 10 minutes. Must be equal to or less than reportInterval)

Example

https://www.imonnit.com/xml/SensorSetHeartbeat/Z3Vlc3Q6cGFzc3dvcmQ=?sensorID=101&reportInterval=120&activeStateInterval=120

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>SensorSetHeartbeat</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>

SensorSetThreshold

Method: SensorSetThreshold
Sets the thresholds of the sensor that activate Aware State

Parameters

sensorID: Integer Unique identifier of the sensor
measurementsPerTransmission: Integer Number of times per heartbeat the thresholds are checked.
minimumThreshold: Integer Minimum Threshold
maximumThreshold: Integer Maximum Threshold
hysteresis: Integer Hysteresis applied before entering normal operation mode

Example

https://www.imonnit.com/xml/SensorSetThreshold/Z3Vlc3Q6cGFzc3dvcmQ=?sensorID=101&measurementsPerTransmission=10&minimumThreshold=320&maximumThreshold=2120&hysteresis=20

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>SensorSetThreshold</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>

SensorSetCalibration

Method: SensorSetCalibration
Sets the calibration values of the sensor.
Calibration if different for each sensor profile (temp, light, etc.) You'll need to know what profile of sensor your calibrating. The calibration routine for any given provile will not use all of the values available. Before calling this method you should first call "SensorGetCalibration" to get the correct values for the fields you will not be changing during the calibration.

Parameters

sensorID: Integer Unique identifier of the sensor
calibration1: 64 bit Integer Value used to store calibration values on sensors. (profile dependant)
calibration2: 64 bit Integer Value used to store calibration values on sensors. (profile dependant)
calibration3: 64 bit Integer Value used to store calibration values on sensors. (profile dependant)
calibration4: 64 bit Integer Value used to store calibration values on sensors. (profile dependant)
eventDetectionType: Integer Type of event detected (profile dependant)
eventDetectionCount: Integer Number of events required to trigger (profile dependant)
eventDetectionPeriod: Integer Time window for event count to be reached (profile dependant)
rearmTime: Integer Time before event can be triggered again (profile dependant)
biStable: Integer Direction of event (profile dependant)
pushProfileConfig1: boolean Set the configuration page to be pushed to the sensor (profile dependant)
pushProfileConfig2: boolean Set the configuration page to be pushed to the sensor (profile dependant)
pushAutoCalibrateCommand: boolean Set the auto calibrate command to be pushed to the sensor (profile dependant)

Example

https://www.imonnit.com/xml/SensorSetCalibration/Z3Vlc3Q6cGFzc3dvcmQ=?sensorID=101&calibration1=0&calibration2=0&calibration3=0&calibration4=0 &eventDetectionType=0&eventDetectionPeriod=0&eventDetectionCount=0&rearmTime=0&biStable=0&pushProfileConfig1=false&pushProfileConfig2=false &pushAutoCalibrateCommand=false

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>SensorSetCalibration</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>

SensorSetAlerts

Method: SensorSetAlerts
Sets alerts active/inactive for network containing sensor

Parameters

sensorID: Integer Unique identifier of the sensor
active: Boolean state to set the notifications. [true | false]

Example

https://www.imonnit.com/xml/SensorSetAlerts/Z3Vlc3Q6cGFzc3dvcmQ=?sensorID=101&active=false

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>SensorSetAlerts</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>

SensorSetTag

Method: SensorSetTag()
sets the Notification active or inactive

Parameters

sensorID: Long Unique identifier of the Sensor
tag: String This is a pipe deliminated string that gives a way to group sensors

Example

https://www.imonnit.com/xml/SensorSetTag/Z3Vlc3Q6cGFzc3dvcmQ=?sensorID=250&tag=Room23|Temp

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>SensorSetTag</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>

SensorAttributes

Method: SensorAttributes
Returns the list of attributes that belong to a sensor.

Parameters

SensorID: interger Unique identifier of the sensor

Example

https://www.imonnit.com/xml/SensorAttributes/Z3Vlc3Q6cGFzc3dvcmQ=?sensorID=101

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>SensorAttributes</Method>
  <Result xsi:type="xsd:collection">
    <APISensorAttribute>
      <APISensorAttribute SensorID="101" Name="CorF" Value="C" />
    </APISensorAttribute>
  </Result>
</SensorRestAPI>

SensorAttributeSet

Method: SensorAttributeSet
Creates/Updates sensor attribute.

Parameters

SensorID: interger Unique identifier of the sensor
Name: string Name of the attribute
Value: string Value for the attribute

Example

https://www.imonnit.com/xml/SensorAttributeSet/Z3Vlc3Q6cGFzc3dvcmQ=?sensorID=101&name=CorF&value=C

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>SensorAttributeSet</Method>
  <Result xsi:type="xsd:collection">
    <APISensorAttribute>
      <APISensorAttribute SensorID="101" Name="CorF" Value="C" />
    </APISensorAttribute>
  </Result>
</SensorRestAPI>

SensorAttributeRemove

Method: SensorAttributeRemove
Remove attribute from sensor.

Parameters

SensorID: interger Unique identifier of the sensor
Name: string Name of the attribute

Example

https://www.imonnit.com/xml/SensorAttributeRemove/Z3Vlc3Q6cGFzc3dvcmQ=?sensorID=101&name=CorF

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>SensorAttributeRemove</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>

SensorSendControlCommand

Method: SensorSendControlCommand
Sends a Control message

Parameters

SensorID: Integer Identifier of sensor to send command to
RelayIndex: Integer Identifier of which relay to use by index.(Relay1 = 0,Relay2 = 1)
State: Integer Identifier of what the relay should do (toggle = 3, on = 2, off = 1)
Seconds: Integer Identifier of how long after receiving the command the command should initialize

Example

https://www.imonnit.com/xml/SensorSendControlCommand/Z3Vlc3Q6cGFzc3dvcmQ=?sensorID=2&relayIndex=0&state=3&seconds=0

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>SensorSendControlCommand</Method>
  <Result xsi:type="xsd:string">Control Message Successfull!! Control request will process when the sensor checks in.</Result>
</SensorRestAPI>

GetDatumNameList

Method: GetDatumNameList
Returns the list of DatumNames that belongs to a sensor.

Parameters

sensorID: Integer Unique identifier of the sensor

Example

https://www.imonnit.com/xml/GetDatumNameList/Z3Vlc3Q6cGFzc3dvcmQ=?sensorID=002599

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>GetDatumNameList</Method>
  <Result xsi:type="xsd:collection">
    <APIDatumNameList>
      <APIDatumName SensorID="002599" Index="0" Name="Probe1" />
      <APIDatumName SensorID="002599" Index="1" Name="Probe2" />
      <APIDatumName SensorID="002599" Index="2" Name="Probe3" />
      <APIDatumName SensorID="002599" Index="3" Name="Probe4" />
    </APIDatumNameList>
  </Result>
</SensorRestAPI>

SetDatumName

Method: SetDatumName
Sets the datum name object.

Parameters

sensorID: Integer Unique identifier of the sensor
index: Integer unique identifier of the datum
name: string New name for the datum

Example

https://www.imonnit.com/xml/SetDatumName/Z3Vlc3Q6cGFzc3dvcmQ=?sensorID=002599&index=0&name=probe1

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>SetDatumName</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>
DataMessage

SensorDataMessages

Method: SensorDataMessages
Returns data points recorded in a range of time (limited to a 7 day window)

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

https://www.imonnit.com/xml/SensorDataMessages/Z3Vlc3Q6cGFzc3dvcmQ=?sensorID=101&fromDate=2011/01/01&toDate=2011/01/02

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>SensorDataMessages</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>

GatewayMessages

Method: GatewayMessages
Returns messages recorded in a range of time (limited to a 7 day window)

Parameters

gatewayID: Integer Unique identifier of the Gateway
fromDate: Date Start of range from which messages will be returned
toDate: Date End of range from which messages will be returned

Example

https://www.imonnit.com/xml/GatewayMessages/Z3Vlc3Q6cGFzc3dvcmQ=?gatewayID=101&fromDate=2016/01/01&toDate=2016/01/02

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>GatewayMessages</Method>
  <Result xsi:type="xsd:string">
    <APIDataMessageList>
      <APIGatewayMessage ReceivedDate="4/18/2016 6:23:30 PM" MessageCount="1" SignalStrength="0" Power="0" Battery="101" MessageType="0" GatewayID="xxxx"/>>
      <APIGatewayMessage ReceivedDate="4/18/2016 6:13:30 PM" MessageCount="1" SignalStrength="0" Power="0" Battery="101" MessageType="0" GatewayID="xxxx"/>>
    </APIDataMessageList>
  </Result>
</SensorRestAPI>

AccountRecentDataMessages

Method: AccountRecentDataMessages
Returns data points recorded in a range of time (limited to a 2 hour window)

This service is changing! "lastMessgeID" is deprecated. It will be replaced with "lastDataMessageGUID" by July 2016.

Parameters

networkID Integer (optional) Unique identifier of the network
minutes: Integer Number of minutes past messages will be returned
lastDataMessageGUID: GUID (optional) Only return messages received after this message ID

Example

https://www.imonnit.com/xml/AccountRecentDataMessages/Z3Vlc3Q6cGFzc3dvcmQ=?accountID=101&minutes=5&lastDataMessageGUID=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

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>AccountRecentDataMessages</Method>
  <Result xsi:type="xsd:string">
    <APIDataMessageList>
      <APIDataMessage  AccountID="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 AccountID="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>

SensorRecentDataMessages

Method: SensorRecentDataMessages
Returns data points recorded in a range of time (limited to a 1 day window)

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

https://www.imonnit.com/xml/SensorRecentDataMessages/Z3Vlc3Q6cGFzc3dvcmQ=?sensorID=101&minutes=5&lastDataMessageGUID=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

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>

AccountDataMessages

Method: AccountDataMessages
Returns data points recorded in a range of time (limited to a 7 day window)

Parameters

networkID Integer (optional) Unique identifier of the network
fromDate: DateTime Start of range from which messages will be returned
toDate: DateTime End of range from which messages will be returned

Example

https://www.imonnit.com/xml/AccountDataMessages/Z3Vlc3Q6cGFzc3dvcmQ=?fromDate=2011/01/01&toDate=2011/01/02

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>AccountDataMessages</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>
    

SensorChartMessages

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 nth 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

https://www.imonnit.com/xml/SensorChartMessages/Z3Vlc3Q6cGFzc3dvcmQ=?sensorID=101&fromDate=2011/01/01&toDate=2011/01/02

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>
    
Notification

RecentlySentNotifications

Method: RecentlySentNotifications
Returns notifications recorded in a range of time (limited to a 12 hour window)

Parameters

minutes: Integer Number of minutes past Notifications will be returned

Optional Parameters

LastSentNotificationID Long Limits notification results to notifications sent after this ID
SensorID Long Limits which sensor notifications will come back. If this field is left null it will bring back all notifications for all sensors.

Example

https://www.imonnit.com/xml/RecentlySentNotifications/Z3Vlc3Q6cGFzc3dvcmQ=?minutes=10&lastSentNotificationID=0&sensorID=0

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>RecentlySentNotifications</Method>
  <Result xsi:type="xsd:string">
    <APISentNotificationList>
      <APISentNotification SentNotificationID="554" NotificationID="228" UserID="10" SensorID="101" GatewayID="0" Text="<p>Temperature is over 100 degrees Farh.</p>" Content="Temperature is over 100 degrees Farh." Name="Temp - 101 Over 100" Delivered="Email Sent" NotificationDate="1/1/2011 6:36:00 PM"/>
      <APISentNotification SentNotificationID="556" NotificationID="229" UserID="10" SensorID="101" GatewayID="0" Text="<p>Temperature is under 32 degrees Farh.</p>" Content="Temperature is over 100 degrees Farh." Name="Temp - 101 Under 32" Delivered="Email Sent" NotificationDate="1/1/2011 6:46:00 PM/>
    </APISentNotificationList>
  </Result>
</SensorRestAPI>

SentNotifications

Method: SentNotifications
Returns data points recorded in a range of time (limited to 7 days and 5000 records)

Parameters

from DateTime from is the starting point of the time period for your date range of notifications sent
to DateTime to is the ending point of the time period for your date range for notifications sent

Optional Parameters

SensorID Long Limits which sensor notifications will come back. If this field is left null it will bring back all notifications for all sensors.

Example

https://www.imonnit.com/xml/SentNotifications/Z3Vlc3Q6cGFzc3dvcmQ=?from=9/29/2014+5:59:19+AM&to=9/29/2014+5:59:19+PM&sensorID=0

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>RecentlySentNotifications</Method>
  <Result xsi:type="xsd:string">
    <APISentNotificationList>
      <APISentNotification SentNotificationID="554" NotificationID="228" UserID="10" SensorID="101" GatewayID="0" Text="<p>Temperature is over 100 degrees Farh.</p>" Content="Temperature is over 100 degrees Farh." Name="Temp - 101 Over 100" Delivered="Email Sent" NotificationDate="1/1/2011 6:36:00 PM"/>
      <APISentNotification SentNotificationID="556" NotificationID="229" UserID="10" SensorID="101" GatewayID="0" Text="<p>Temperature is under 32 degrees Farh.</p>" Content="Temperature is over 100 degrees Farh." Name="Temp - 101 Under 32" Delivered="Email Sent" NotificationDate="1/1/2011 6:46:00 PM/>
    </APISentNotificationList>
  </Result>
</SensorRestAPI>

NotificationRecipientList

Method: NotificationRecipientList
Returns all recipients on the specified notification.

Parameters

notificationID: Long Unique identifier of the Notification

Example

https://www.imonnit.com/xml/NotificationRecipientList/Z3Vlc3Q6cGFzc3dvcmQ=?notificationID=101

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>NotificationRecipientList</Method>
  <Result xsi:type="xsd:collection">
    <APINotificationRecipientList>
      <APINotificationRecipient UserID="554" Type="Email" DelayMinutes="15" RecipientID="1562"/>
      <APINotificationRecipient UserID="556" Type="SMS" DelayMinutes="15" RecipientID="1563"/>
    </APINotificationRecipientList>
  </Result>
</SensorRestAPI>

SensorAssignedToNotificaiton

Method: SensorAssignedToNotificaiton
Returns the list of sensors that belongs to user based on the notification they are assigned to.

Parameters

notificationID: Long Filters list to sensors that belong to this notification id

Example

https://www.imonnit.com/xml/SensorAssignedToNotificaiton/Z3Vlc3Q6cGFzc3dvcmQ=?notificationID=3
Only sensors that contain a notification id of 3 are returned

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>SensorAssignedToNotificaiton</Method>
  <Result xsi:type="xsd:collection">
    <APISensorList>
      <APISensor SensorID="101" MonnitApplicationID="2" CSNetID="100" SensorName="Room3_Ceiling" LastCommunicationDate="6/1/2011 4:09:41 PM" NextCommunicationDate="6/13/2011 6:11:41 PM" LastDataMessageID="1" PowerSourceID="1" Status="1" CanUpdate="True" CurrentReading="122° F" BatteryLevel="0" SignalStrength="-36" AlertsActive="True" />
      <APISensor SensorID="102" MonnitApplicationID="2" CSNetID="100" SensorName="Room3_Floor" LastCommunicationDate="1/1/2099 12:00:00 AM" NextCommunicationDate="1/1/2099 12:01:00 AM" LastDataMessageID="-9223372036854775808" PowerSourceID="1" Status="4" CanUpdate="True" CurrentReading="No Reading Available" BatteryLevel="100" SignalStrength="100" AlertsActive="True" />
      <APISensor SensorID="10" MonnitApplicationID="2" CSNetID="100" SensorName="Room3_Door" LastCommunicationDate="6/1/2011 5:21:08 PM" NextCommunicationDate="6/13/2011 7:23:08 PM" LastDataMessageID="218" PowerSourceID="1" Status="1" CanUpdate="False" CurrentReading="-1767.8° F" BatteryLevel="100" SignalStrength="-59" AlertsActive="True" />
    </APISensorList>
  </Result>
</SensorRestAPI>

GatewayAssignedToNotificaiton

Method: GatewayAssignedToNotificaiton
Returns the list of Gateways that belongs to user based on the notification they are assigned to.

Parameters

notificationID: Long Filters list to Gateways that belong to this notification id

Example

https://www.imonnit.com/xml/GatewayAssignedToNotificaiton/Z3Vlc3Q6cGFzc3dvcmQ=?notificationID=3
Only gateways that contain a notification id of 3 are returned

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>GatewayAssignedToNotificaiton</Method>
  <Result xsi:type="xsd:collection">
    <APIGatewayList>
      <APIGateway GatewayID="2599" NetworkID="100" Name="Building2 (103) gateway" GatewayType="Ethernet_Gateway" Heartbeat="5" IsDirty="False" LastCommunicationDate="1/11/2011 2:57:36 PM" LastInboundIPAddress="" />
      <APIGateway GatewayID="100" NetworkID="100" Name="Building3 (Gateway) 100" GatewayType="usb" Heartbeat="5" IsDirty="False" LastCommunicationDate="2/6/2011 4:30:44 PM" LastInboundIPAddress="" />
      <APIGateway GatewayID="901" NetworkID="100" Name="WiFi Gateway(WIFI ActiveID) Building1" GatewayType="Wifi_Sensor" Heartbeat="15" IsDirty="True" LastCommunicationDate="2/6/2011 4:18:40 PM" LastInboundIPAddress="" />
    </APIGatewayList>
  </Result>
</SensorRestAPI>

ToggleNotification

Method: ToggleNotification()
sets the Notification active or inactive

Parameters

notificationID: Long Unique identifier of the Notification
on: Bool on flag that sets the notification on or off based off its value

Example

https://www.imonnit.com/xml/ToggleNotification/Z3Vlc3Q6cGFzc3dvcmQ=?notificationID=250&on=true

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>ToggleNotification</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>

AccountNotificationList

Method: AccountNotificationList
Return all notifications on the specified account

Parameters

None

Example

https://www.imonnit.com/xml/AccountNotificationList/Z3Vlc3Q6cGFzc3dvcmQ=?accountID=101

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>AccountNotificationList</Method>
  <Result xsi:type="xsd:collection">
    <APINotificationList>
      <APINotification NotificationID="519" Name="inactivity test" Subject="inactivity test" Text="" SMSText="" VoiceText="" AccountID="1" Active="False" JointSnooze="True" AutoAcknowledge="True" Comparer="Greater_Than" Theshold="3" Scale="" Snooze="0" LastDateSent="8/31/2016 7:35:03 PM" DatumType=""  AdvancedNotificationID="-9223372036854775808" NotificationClass="Inactivity"/>
      <APINotification NotificationID="457" Name="test1" Subject="test1" Text="test1" SMSText="" VoiceText="" AccountID="1" Active="False" JointSnooze="True" AutoAcknowledge="False" Comparer="Less_Than" Theshold="95" Scale="" Snooze="60" LastDateSent="1/1/0001 12:00:00 AM" DatumType=""  AdvancedNotificationID="-9223372036854775808" NotificationClass="Low_Battery"/>
    </APINotificationList>
  </Result>
</SensorRestAPI>

SensorNotificationList

Method: SensorNotificationList
Returns all notifications of the specified Sensor

Parameters

sensorID: Long Brings back a list of all notifications of a specific sensor

Example

https://www.imonnit.com/xml/SensorNotificationList/Z3Vlc3Q6cGFzc3dvcmQ=?sensorID=101

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>SensorNotificationList</Method>
  <Result xsi:type="xsd:string">
    <APINotificationList>
      <APINotification NotificationID="519" Name="inactivity test" Subject="inactivity test" Text="" SMSText="" VoiceText="" AccountID="1" Active="False" JointSnooze="True" AutoAcknowledge="True" Comparer="Greater_Than" Theshold="3" Scale="" Snooze="0" LastDateSent="8/31/2016 7:35:03 PM" DatumType=""  AdvancedNotificationID="-9223372036854775808" NotificationClass="Inactivity"/>
      <APINotification NotificationID="457" Name="test1" Subject="test1" Text="test1" SMSText="" VoiceText="" AccountID="1" Active="False" JointSnooze="True" AutoAcknowledge="False" Comparer="Less_Than" Theshold="95" Scale="" Snooze="60" LastDateSent="1/1/0001 12:00:00 AM" DatumType=""  AdvancedNotificationID="-9223372036854775808" NotificationClass="Low_Battery"/>
    </APINotificationList>
  </Result>
</SensorRestAPI>

NotificationScheduleList

Method: NotificationScheduleList
Returns a list of Schedules for a specific notification

Parameters

notificationID: Long Brings back a list of all the daily schedules for the specific notification

Optional Parameters

day: string Brings back a single day's schedule

Example

https://www.imonnit.com/xml/NotificationScheduleList/Z3Vlc3Q6cGFzc3dvcmQ=?notificationID=101&day=Monday

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>NotificationScheduleList</Method>
  <Result xsi:type="xsd:string">
    <APINotificationScheduleList>
      <APINotificationSchedule DayOfWeek="Monday" FirstEnteredTime="00:00:00" SecondEnteredTime="00:00:00" NotificationSchedule="All_Day"/>
    </APINotificationScheduleList>
  </Result>
</SensorRestAPI>
Webhook

WebHookGet

Method: WebHookGet
Returns settings used to send data to external source.

Parameters

None

Example

https://www.imonnit.com/xml/WebHookGet/Z3Vlc3Q6cGFzc3dvcmQ=

Example Output

&<SensorRestAPI>
  <Method>ExternalDataPush</Method>
  <Result xsi:type="xsd:collection">
    <APIWebHookGet ConnectionInfo="http://www.mydomain.com/{1}" BrokenCount="0" LastResult="ok" SendingEnabled="True" RetriesDisabled="True"/>
  </Result>
</SensorRestAPI>

WebHookCreate

Method: WebHookCreate
Sets configuration to send data to external source. Returns Webhook configuration

Parameters

baseUrl: String Url of 3rd party server and defined data to send (Url Encoded). If this value contains an & character,
it must be replaced by its urlencoding, %26. Depending on the context, you may also have to escape a % using %25

Example

https://www.imonnit.com/xml/WebHookCreate/Z3Vlc3Q6cGFzc3dvcmQ=?baseUrl=http://mydomain.com/{1}

Example Output

&<SensorRestAPI>
  <Method>WebHookCreate</Method>
  <Result xsi:type="xsd:collection">
    <APIWebHookGet ConnectionInfo="http://www.mydomain.com/{1}" BrokenCount="0" LastResult="ok" SendingEnabled="True" RetriesDisabled="True"/>
  </Result>
</SensorRestAPI>

WebHookRemove

Method: WebHookRemove
Deletes exsiting webhook

Parameters

None

Example

https://www.imonnit.com/xml/WebHookRemove/Z3Vlc3Q6cGFzc3dvcmQ=

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>WebHookRemove</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>

WebHookResetBroken

Method: WebHookResetBroken
Resets the send count of the Webhook to have it attempt to resend subscriptions again.

Parameters

None

Example

https://www.imonnit.com/xml/WebHookResetBroken/Z3Vlc3Q6cGFzc3dvcmQ=

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>WebHookResetBroken</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>

WebHookAttempts

Method: WebHookAttempts
Returns either all attempts information or only unsuccessful attempts information

Parameters

showOnlyErrors boolean Return only unsuccessful attempts
fromDate: DateTime Start of range from which attempts will be returned
toDate: DateTime End of range from which attempts will be returned
lastAttemptID: Integer (optional) Only return attempts received after this attempt ID

Example

https://www.imonnit.com/xml/WebHookAttempts/Z3Vlc3Q6cGFzc3dvcmQ=?showOnlyErrors=false&fromDate=2016/01/01&toDate=2016/02/02

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>WebHookAttempts</Method>
  <Result xsi:type="xsd:string">
    <APIWebHookAttemptsList>
      <APIWebHookAttempts AttemptID="569" CreateDate="4/4/2016 8:29:42 PM" Url="http://mydomain.com/{1}" ProcessDate="4/4/2016 8:29:42 PM" Retry="False" AttemptCount="1" Status="Success"/>>
      <APIWebHookAttempts AttemptID="568" CreateDate="4/4/2016 8:29:42 PM" Url="http://mydomain.com/{1}" ProcessDate="4/4/2016 8:28:00 PM" Retry="False" AttemptCount="1" Status="Success"/>>
    </APIWebHookAttemptsList>
  </Result>
</SensorRestAPI>
    

WebHookResend

Method: WebHookResend
Requeue a webhook attempt to be retried. Limit of 10 retries per attempt.

Parameters

attemptID: Integer Unique identifier of Attempt to resend

Example

https://www.imonnit.com/xml/WebHookResend/Z3Vlc3Q6cGFzc3dvcmQ=?attemptID=1

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>WebHookResend</Method>
  <Result xsi:type="xsd:string">Success</Result>
</SensorRestAPI>

WebHookAttemptBody

Method: WebHookAttemptBody
Returns Body of specified Attempt

Parameters

attemptID: Integer Unique identifier of Attempt to resend

Example

https://www.imonnit.com/xml/WebHookAttemptBody/Z3Vlc3Q6cGFzc3dvcmQ=?attemptID=1

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>

WebhookListNotificationSettings

Method: WebhookListNotificationSettings
Lists when and to whom emails are sent when your Data Push fails multiple times in a row

Parameters

None:

Example

https://www.imonnit.com/xml/WebhookListNotificationSettings/Z3Vlc3Q6cGFzc3dvcmQ=?

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>WebhookListNotificationSettings</Method>
  <Result xsi:type="xsd:collection">
   <APINotificationSettings UserToBeNotified="John Doe" BrokenCountThreshold="10" LastEmailDate="10/20/2016 8:57:31 PM" LargestBrokenCount="Webhook 18"/>
  </Result>
</SensorRestAPI>

WebhookNotificationSettingsSet

Method: WebhookNotificationSettingsSet
Allows you to set when and to whom emails are sent when your Data Push fails multiple times in a row

Parameters

UserIDToBeNotfied: long Unique identifier of user that will recieve the broken count notification.
brokenCountThreshold: Integer The number of failed attempts before a notification is sent.

Example

https://www.imonnit.com/xml/WebhookNotificationSettingsSet/Z3Vlc3Q6cGFzc3dvcmQ=?UserIDToBeNotfied=123&brokenCountThreshold=10

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>WebhookNotificationSettingsSet</Method>
  <Result xsi:type="xsd:collection">
   <APINotificationSettings UserToBeNotified="John Doe" BrokenCountThreshold="10" LastEmailDate="10/20/2016 8:57:31 PM" LargestBrokenCount="Webhook 18"/>
  </Result>
</SensorRestAPI>
Code Samples
Code

C# Sample

Contributor

Brandon

Methods Used

GetAuthToken SensorList

Example Output

string address = string.Format("https://www.imonnit.com/xml/GetAuthToken?username=guest&password=guestpassword");
XDocument xdoc = XDocument.Load(address);

string AuthToken = xdoc.Descendants("Result").Single().Value;
int NetworkID = 1234;

address = string.Format("https://www.imonnit.com/xml/SensorList/{1}?NetworkID={2}", AuthToken, NetworkID);
xdoc = XDocument.Load(address);

var SensorList = (from s in xdoc.Descendants("APISensor")
                    select new
                    {
                        SensorID = Convert.ToUInt32(s.Attribute("SensorID")),
                        SensorName = s.Attribute("SensorName").Value,
                        NetworkID = Convert.ToInt32(s.Attribute("CSNetID")),
                    }); 

PHP Sample

Contributor

Marc

Methods Used

SensorDataMessages SensorList

User Submited PHP Sample

<?php

function getData($AuthToken,$ActionType,$ActionParams) {

    $APIurl = 'https://www.imonnit.com/xml/' . $ActionType . '/' . $AuthToken.$ActionParams;

    //echo $APIurl;
    
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_URL, $APIurl);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    $xmlResult1 = curl_exec($curl);

    if ($xmlResult1 === false) {
        die('Error fetching data: ' . curl_error($curl));
    }

    curl_close($curl);

    $xml = simplexml_load_string($xmlResult1);

    if ($xml === false) {
        die('Error parsing XML');
    }
    
    return $xml;
}

$Username = "guest";
$Password = "password";
$Token = base64_encode($Username . ":" . $Password);

$xmlresult = getData($Token, "SensorList","");
$Sensorlist=$xmlresult->Result->APISensorList;

    $sensor=$Sensorlist->APISensor[(Integer)$_POST['name']];

    $timeval=strtotime($sensor["LastCommunicationDate"]);
    $actparam="?sensorID=".$sensor["SensorID"] . "&fromDate=".date("Y/m/d",$timeval-7*24*60*60)."&toDate=".date("Y/m/d",$timeval);
    $datavals=array();
    
    $xmlresult = getData($Token, "SensorDataMessages",$actparam);
    $Messagelist=$xmlresult->Result->APIDataMessageList;
    
    header("Content-Type: application/json"); 
    
    foreach ($Messagelist->APIDataMessage as $datamessage) {
        $point=array((string)$datamessage["MessageDate"],(string)$datamessage["DisplayData"]);
        $datavals[]=$point;
    }
    echo json_encode($datavals);

?>
    

Html Sample

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" />
<script type="text/javascript">
    $(document).ready(function() {
        $('#getData').click(function() {
            messageval = "";
            $.post('data.php', { name: form.name.value },
                function(data) {
                    console.log(data);
                    $.each(data, function(key, pointvalue) {
                        //alert(eval(value["x"]));
                        messageval += "Message-" + key + ": " + pointvalue[0] + "," + pointvalue[1] + "<br>";

                    });
                    $("div").html(messageval).show();
                }, "json");
        });
    });
</script>
<form name="form">
    <input type="text" name="name"/><input id="getData" type="button" value="get"/>
    <div></div>
</form>
    

PHP Sample 2

Contributor

Adjustments by Shannon

Methods Used

SensorDataMessages SensorList

User Submited PHP Sample 2

<?php

function getData($AuthToken,$ActionType,$ActionParams) {

    $APIurl = 'https://www.imonnit.com/xml/' . $ActionType . '/' . $AuthToken.$ActionParams;

    //echo $APIurl;
    
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_URL, $APIurl);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    $xmlResult1 = curl_exec($curl);

    if ($xmlResult1 === false) {
        die('Error fetching data: ' . curl_error($curl));
    }

    curl_close($curl);

    $xml = simplexml_load_string($xmlResult1);

    if ($xml === false) {
        die('Error parsing XML');
    }
    
    return $xml;
}

$Username = "guest";
$Password = "password";
$Token = base64_encode($Username . ":" . $Password);

$xmlresult = getData($Token, "SensorList","");
$Sensorlist=$xmlresult->Result->APISensorList;
print_r($Sensorlist);
echo '


'; $sensor=$Sensorlist->APISensor[0]; print_r($sensor); echo '


'; $timeval=strtotime($sensor["LastCommunicationDate"]); $actparam="?sensorID=".$sensor["SensorID"] . "&fromDate=".date("Y/m/d",$timeval-7*24*60*60)."&toDate=".date("Y/m/d",$timeval); $datavals=array(); $xmlresult = getData($Token, "SensorDataMessages",$actparam); $Messagelist=$xmlresult->Result->APIDataMessageList; foreach ($Messagelist->APIDataMessage as $datamessage) { $point=array((string)$datamessage["MessageDate"],(string)$datamessage["DisplayData"]); $datavals[]=$point; } echo json_encode($datavals); ?>

Javascript Sample

Contributor

Brandon

Methods Used

GetAuthToken Login

Javascript Sample

Test JSONP Example Code
Username:
Password:

Code:
Test JSONP Example Code<br/>
Username: <input id="username"/><br/>
Password: <input id="password"/><br/>
<button onclick="test();">Test</button><br/>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script>
  function test(){
    $.ajax({
      url: 'https://www.imonnit.com/json/GetAuthToken',
      data: { username: $('#username').val(), password: $('#password').val() },
      dataType: 'jsonp',
    }).done(function (results) {
			
      $.ajax({
      url: 'https://www.imonnit.com/json/Logon/' + results.Result,
      dataType: 'jsonp',
      }).done(function (results) {
        alert(results.Result);
      });
    });
  }
</script>