Gravio also supports receiving webhooks. It receives messages from services that request an URL provided by Gravio, either locally or via the Internet. Data received via Webhook will be treated like incoming sensor- or video/AI data.

Creating a Webhook

Step 1: Display the Settings Panel

Press the “Webhook” button, and the settings panel will appear:

Step 2: Register the Webhook URL

In the settings panel, register the URL for the webhook:

Step 3: Display the Registration Panel

Press the “+” button, and the registration panel will appear. Fill in the data. Make sure you give your webhook a meaningful name, because the name will appear in the layers and sensor data:

The webhook consists of a name, custom path, and the format of the payload, which can be POST data or from a GET request, with the option to choose between No Authentication or BASIC Authentication. The authentication information is expected to be provided by the service initiating the webhook call.

The custom path is fixed up to "/webhook/urls/", and you must enter an alphanumeric path of at least 8 characters following it. The custom paths also allows for -, _ and /, so a user can create any/path/like

The payload format is chosen based on whether the webhook will be received via GET or POST, but it will always be a JSON document.

For the authentication type, selecting none will receive without authentication. If BASIC Authentication is chosen, enter a username with at least 4 alphanumeric characters and a password with at least 8 alphanumeric characters.

Step 4: Add the newly created webhook as a data layer to your area.

Note the Webhook is called “Webhook JSON” because output of the Webhook layer is always a JSON document, whether it’s posted or from POST data or an URL request:

Step 5: Add the Webhook you just created to the layer

Click on the + sign in the circle on the top left and assign the “Logical Device” to the layer:

Make sure the Webhook layer is switched on:

Step 6: Test your Webhook

You can now use a program such as Postman to test your webhook. Just send the data to the IP address…

… and verify that it’s being received in the Data Viewer:

With the data coming in, you can start triggering actions.

Note, the webhook will response with HTTP Codes 400, 404, 500 etc. and return an error for more context if an error occurs.

Need more help with this?
Join our slack community for help

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.