imonnit, account, webhook, sensors, export, database, data
Guide to creating a 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
- Navigate to "Settings" on the primary menu. Select the link for API / Webhook located in the top corner.
- The Data Push Info page will open. 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 allowed per account.
If you have an existing data push, this tab will read "Edit
." You must end the existing data push to see the "Create
- Open up the dropdown menu on the Create Data Type page and select Amazon AWS.
- The page to configure Amazon AWS will open.
- This pushes data to your Amazon API Gateway endpoint when data is received at the server. Create an Amazon API Gateway "POST" in your AWS console to represent this connection. AWS Signature Version 4 is required for authentication. All sensors and gateway message data will be pushed to this endpoint. Data is sent as JSON. Amazon Web Services, AWS, and API Gateway are trademarks of Amazon.com, Inc. or its affiliates in the United States and/or other countries.
- Select the button Sign In to the Console in the top right-hand corner of the Amazon API gateway.
- If you already have an Amazon Web Services account, log in. If not, choose the Create a new AWS account button. Then follow the on-screen directions to create an account. You will need a credit or debit card handy to create an account. Amazon won't charge you unless your usage exceeds the AWS Free Tier Limits.
- Once inside your AWS account, select the desired API.
- Select the stage you have deployed your API.
- Input the Invoke URL in the text box on the Configure Amazon Page in iMonnit. This is the location you want to send the data.
- Go back to the Amazon AWS tab. Navigate to API Keys. Then select Actions, Finish by selecting "Create API Key."
- Enter the Amazon API Key in the text box on iMonnit.
- Move on to 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. Gateway messages can be none or multiple. Failed messages are indicated by a red X. You may only have one webhook per account. Every message on your account will be relayed through this webhook.
Note that the tab which 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 an API Webhook with Amazon AWS!