Data Reporting
Overview
After being registered with the IoT platform and powered on, a device can collect and report data based on the service logic. Data collection and reporting can be triggered by a schedule or by specific events. Devices can send data to the platform in the following ways:
- Reporting device messages: A device reports custom data to the platform through message reporting APIs. The platform does not parse or store the messages reported. Instead, it forwards the messages to other HUAWEI CLOUD services for storage and processing based on data forwarding rules. Then, the data is further processed through the consoles or APIs of the other services.
- Reporting raw device data (binary): A device reports raw code streams through binary reporting APIs. The platform uses codecs to parse the raw data into JSON data defined in the product model and then performs subsequent processing.
- Reporting device properties: A device reports property data defined in the product model through property reporting APIs. The platform parses the data and then performs subsequent processing.
- Batch reporting device properties: A gateway reports data of a batch of devices to the platform at a time. The platform parses the data and then performs subsequent processing.

Considering power consumption and bandwidth, CoAP devices can report only raw binary code streams. The platform uses codecs to convert the code streams into JSON data defined in the product model before performing subsequent processing.
Querying Historical Data
You can use IoT Analytics (if subscribed to) to perform time series insight analysis on historical data reported by devices.
To view historical data, you are automatically redirected to IoT Analytics. Property data reported and messages reported can be viewed.
To view the analysis result on the properties and messages carried by using IoT Analytics, ensure that the following conditions are met:
- The product model has been developed.
- The reported properties are the same as those defined in the product model.
- By default, IoT Analytics stores data in messages and properties reported (without product models) in the original data format. You need to define the format of the fields to be analyzed in IoT Analytics.
- Log in to the IoTDA console.
- In the navigation pane, choose Devices > All Devices. In the device list displayed, click View in the row of a device to access its details. Click Query Historical Data to access IoT Analytics for time sequence insight analysis.

You can also view historical data of all devices in the current resource space and export historical data.
Application APIs
Last Article: Overview
Next Article: Subscription and Push
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.