In this article
Categories

How to Forward Data from AlphaX Cloud via HTTP Post to Another Platform

Print

Introduction:

AlphaX Cloud offers a powerful feature that allows you to forward data from your sensors to another platform or service using HTTP Post. This feature can be incredibly useful for integrating your data with external systems or performing specific actions based on sensor data. In this guide, we will walk you through the process of setting up and configuring data forwarding via HTTP Post in AlphaX Cloud.

Note: throughout this article the terms Webhook and HTTP Post are used interchangeably.

Note: The HTTP Post method only allows communication on SSL (HTTPS). HTTP non secure connections are not supported.

Step 1: Navigate to the Alerts Section
  1. To get started, log in to your AlphaX Cloud account and navigate to the “Alerts” section, located in the left menu bar.
  2. Click on “Alerts” to access a screen displaying all available alerts.
Step 2: Create a New Alert
  1. In this example, we will create a new alert for data forwarding, but you can also choose to edit an existing alert if one already exists.
  2. Click on the “Create New Alert” button located at the top right corner of the screen.
  3. A quick create wizard will appear, prompting you to provide some details for your alert.
Step 3: Configure Alert Details
  1. Enter a name for your alert to identify it easily.
  2. Assign the alert to an asset, preferably the highest-level asset that covers all the sensor points you want to include in the alert.
  3. Select the specific sensor points that you want to forward data from.
Step 4: Set Data Forwarding Conditions
  1. In the next window, define the conditions for when the data will be sent to the external platform.
  2. You can choose to forward data only when a specific value equals a certain value or select the option to forward all data received.
  3. Click “Next” to proceed.
Step 5: Select Actions for Data Forwarding
  1. On this screen, you can select the actions to be taken when a message is received that matches the alert conditions.
  2. Choose the “HTTP Post” feature, also known as a Webhook.
  3. Enter the Webhook URL where you want to send the data. Note that only basic URL parameters can be added in the wizard.
Step 6: Specify Active Time Range
  1. Select the date and time range during which the alert will be active. Data will only be forwarded within this active period.

Adding Headers to the Webhook:

To enhance your data forwarding setup, you can add custom headers to the Webhook. Here’s how:

Step 1: Navigate to the Alerts List
  1. Locate the alert you are interested in within the “Alerts” list.
Step 2: Access Notifications Section
  1. Click on the alert’s name or the edit icon to access its details.
  2. Scroll down to the “Notifications” section.
Step 3: Add Headers
  1. Find the “Webhook” heading, which includes the URL.
  2. Underneath the URL, there will be an “Add Headers” button.
  3. Click the “Add Headers” button to create custom headers.
  4. Enter the header in the first field and its corresponding value in the second field.
  5. If you make a mistake, you can edit or delete headers and add new ones using the provided buttons.

Conclusion:

By following these steps, you can easily configure AlphaX Cloud to forward data from your sensors to another platform or service via HTTP Post. Adding custom headers allows you to tailor the integration to your specific needs, ensuring seamless data transfer and integration with external systems.

Data Format for POST:

{"data":{"siteid":"62fb32ebd99a400cd94afc72","location":{"coordinates":["145.370098","-38.122304"],"type":"Point"},"deviceName":"Minnovation Ground Floor - Passage People Counter","channelDescription":"People IN","offset":"0","cal":"1","siteName":"Level G","labelName":"Active","labelColor":"green","netid":"24E124716D456117","chid":"4","tag":"MIN-OFC-PPC-001","unit":"#","sensorType":"Count","id":"65b70f0822f96a4e6108a1f5","data":{"timestamp":"2024-02-05 00:19:07.804","value":"65"},"limitData":"0","limitOutput":"0","timezone":"UTC"},"triggerConditions":[{"label":"New Data","limit":"0","condition":"online"}]}