Configuring an iMonnit Webhook

As a Premiere user, you can have Monnit push the sensor readings from iMonnit® to your database with our external configuration tool. This tool allows you to pass data from your wireless sensor network devices to another service in real time. This is done by coding the data into a URL query, then sending the data via HTTP get request at the time data is received. There is an extensive list of parameters that can be passed, allowing you to send detailed information about both the data and the sensor.

Setting up a Webhook

  • Open iMonnit
  • Navigate to the API/Webhook Page by opening up the account menu in the top right corner of the screen. Select API/Webhook.
  • The API Information page will open.

Tab Layout

The Tab Bar across the top will read as follows:

tab bar layout

A. API Information will be the first page to appear. Here you can find information on Data Push, General Output Format, Gateway Parameters, and Sensor Parameters.

B. The History tab displays the history of your data pushes. A Data Push sends data to your endpoint when data is received at the server. You can configure the destination and query parameters used to route the request. Data is compiled as a JSON body and sent via HTTP POST. There are four (4) endpoints available now. Webhook, Amazon AWS, Microsoft Azure IoT Hub, and IBM Watson. Only one (1) data push is allowed per account. If no data push has been configured, this page will be blank.

C. Depending on if you have an existing data push or not this next tab will either read “Create” or “Edit.” If you have an existing data push, this tab will read “Edit” You must end the existing data push to see the “Create” tab and make a new data push.

D. The Notification Tab covers data push settings that allow you to customize when and to whom emails are sent when your External Data Push fails multiple times in a row. You will only be notified once every 24 hours unless your data push failures exceed 100, in which case you will be notified of your data push being disabled.

Creating a Webhook

  • Select the Create Tab.
  • Open the dropdown menu on the Create Data Type page. Select “Webhook.”
  • A webhook sends data to your application when data is received at the server. You can configure the URL, Headers, Cookies, and query parameters used to route the request. Headers and cookies will be available to add after saving your connection string. Data is compiled as a JSON body and sent via HTTP POST.

configure the webhook

  • Base URL: This is the location you want to send the DataPush
  • Send gateway message: This is where you decide if you want ALL gateway messages sent to you or only messages that contain a message from your sensor
  • Authentication: Choose “Basic” or “None” to add authentication to your webhook. Selecting “Basic” will ask for the username and password combination to grant access to the webhook.
  • Save your configuration

Note that the tab that used to read “Create” now reads “Edit.” The new data push must be ended for the Create option to be displayed again.

Congratulations! You’ve created a Webhook!