跳转至主要内容
CloudStudio

灵活数据交换

简介

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.

步骤 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}

W此处:

  • DeviceAddress is the device address, as 输入ed 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/06A022B39C14

Configuring the 访问令牌

The 访问令牌 must also be sent as part of the header, using an Authorization header, as shown 下方:

Authorization: Bearer {accessToken}

Alternatively, when it is not possible to send the token through the Authorization header, the 访问令牌 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={accessToken}

Once 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.

最后更新于

本页内容