Creating a Data Connector
A quick guide on how to create a Data Connector using DT Studio or our APIs.
Overview
To illustrate the process, we will create a new Data Connector that forwards all events to webhook.site, a free service that fulfills the same role as a server that lets you inspect the contents of each request. If you already have an HTTPS POST endpoint set up, feel free to use that instead.
Prerequisites
Service Account Creating, updating, and deleting Data Connectors requires that your User or Service Account has been granted the role Project Developer or higher.
HTTPS Endpoint Data Connectors sends events as POST requests over HTTPS. In order to receive these events you need to have a service up and running that can accept incoming HTTPS connections.HTTP is not supported. In this guide, we will use webhook.site as an example.
Please note that Disruptive Technologies and webhook.site are in no way affiliated and that the data sent there is publicly available.
Creating a New Data Connector
Data Connectors can be created using either the DT Studio interface or our REST API. For simplicity, most of the configurations will be left as default in this example. If you're interested in a more custom Data Connector, see the Configuring a Data Connector page for more information.
In DT Studio, navigate to your Project. In the left menu, locate Data Connectors under API Integrations and press Add Data Connector. This will open the Data Connector configuration menu.
Edit the following parameters.
Display name Give the Data Connector some identifiable display name.
Endpoint URL The URL the Data Connector will forward events to. As we use webhook.site in this example, navigate to https://webhook.site to generate a new URL on the form
https://webhook.site/<RANDOM_ID>
. Copy this URL, and paste it into the Endpoint URL field of the Data Connector config.
Remember to save your Data Connector configuration at the bottom of the page.
Test Your Data Connector
The simplest way of testing your connection is by forwarding an event in one of the following ways.
Wait for a sensor in the project to naturally emit an event by its periodic heartbeat.
Touching a sensor to force an emitted event.
Use the Sensor Emulator to emulate an emitted event.
Once an event has been forwarded by the Data Connector, each event will be visible as individual requests at the generated webhook.site URL.
You can verify that an event has been successfully forwarded by looking at the Data Connector metrics.
The Data Connector metrics can be found at the top of the Data Connector page in Studio.
If the Error counter is incrementing, it indicates that DT Cloud is unable to forward events to your endpoint. This can be for any of the following reasons:
You have entered an incorrect Endpoint URL in the Data Connector config.
An invalid SSL certificate has been configured on the server. See Server Configuration for more details.
If you're forwarding events to a cloud function, make sure the cloud function is publicly available and does not require authentication. Otherwise, DT Cloud will receive 401 or 403 error codes from your endpoint.
Check your error logs for any other issues.
Last updated