Flexible Data Exchange
Introduction
Flexible data exchange is the recommended HTTP integration method when it is not possible to modify the data format sent by the device.
Flexible data exchange supports only Uplink messages. Uplink messages are all those sent from devices to the platform. The platform must be able to process uplink messages to store the relevant information and process it. This is achieved using scripting to interpret message content and store the information on the platform.
It is not possible to send Downlink messages (i.e., from the platform to the device) using flexible HTTP data exchange.
Steps to Follow
Configuring the Data Upload URL
For the platform to receive device data, you need to configure the device to POST HTTP messages to the following URL:
https://gear.cloud.studio/api/v2/uplink/{DeviceAddress}Where:
- DeviceAddress is the device address, as entered when creating the device on the platform.
For example, if the device address is 06A022B39C14, then the device should be configured to POST to the following URL:
https://gear.cloud.studio/api/v2/uplink/06A022B39C14Configuring the Access Token
The access token must also be sent as part of the header, using an Authorization header, as shown below:
Authorization: Bearer e54e0911-ece3-4b7a-b84d-afc01dfa81f1Alternatively, when it is not possible to send the token through the Authorization header, the access token can be sent as part of the URL via the "accessToken" parameter, as in the following example:
https://gear.cloud.studio/api/v2/uplink/06A022B39C14?accessToken=e54e0911-ece3-4b7a-b84d-afc01dfa81f1Once these steps are completed, the platform will begin receiving and processing device information. If the device uses a model not natively supported by the platform, you will also need to define the data processing scripts, as described in this section.