Device Reporting Information
Function
This API is used by a device to report device information to the platform.
Topic
Upstream: $oc/devices/{device_id}/sys/events/up
Parameters
Parameter |
Mandatory/Optional |
Type |
Description |
---|---|---|---|
object_device_id |
Optional |
String |
Explanation:
|
services |
Optional |
List<ServiceEvent> |
Explanation: List of services that an event is about. |
ServiceEvent structure
Parameter |
Mandatory/Optional |
Type |
Description |
---|---|---|---|
service_id |
Mandatory |
String |
Explanation: System field. Value range: Fixed at $sdk_info. |
event_type |
Mandatory |
String |
Explanation: System field. Value range: Fixed at sdk_info_report. |
event_time |
Optional |
String |
Explanation: Event time. UTC time format: yyyyMMdd'T'HHmmss'Z'. If this parameter is not carried in the reported data or is in incorrect format, the time when the platform receives the data is used. |
paras |
Optional |
Object |
Explanation: Event parameters in JSON format. |
paras structure
Parameter |
Mandatory/Optional |
Type |
Description |
---|---|---|---|
device_sdk_version |
Optional |
String |
Explanation: Device SDK version number. The value is in the format of access mode_version number, for example, C_v0.5.0, JAVA_v0.5.0, or Tiny SDK_v1.0.0. |
sw_version |
Optional |
String |
Explanation: Software version. |
fw_version |
Optional |
String |
Explanation: Firmware version. |
device_ip |
Optional |
String |
Explanation: Device IP address. |
Example
Topic: $oc/devices/{device_id}/sys/events/up Data format: { "object_device_id": "{object_device_id}", "services": [{ "service_id": "$sdk_info", "event_type": "sdk_info_report", "event_time": "20151212T121212Z", "paras": { "device_sdk_version": "C_v0.5.0", "sw_version": "v1.0", "fw_version": "v1.0", "device_ip": "127.0.0.1" } }] }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot