Device Reporting the Configuration Response
Function
This API is used by a device to report the configuration result. When creating a remote configuration task, you can configure a timeout interval (1 to 30 days). If not configured, the timeout interval is set to 30 days by default. The platform delivers configuration items to the device every 24 hours within the timeout interval until the device returns a configuration response. If the device does not return a configuration response within the timeout interval, the platform will display a message indicating that the configuration task times out.
Topic
Upstream: $oc/devices/{device_id}/sys/events/up
Parameters
Parameter |
Mandatory or Optional |
Type |
Description |
---|---|---|---|
object_device_id |
Optional |
String |
Indicates the device that the event is about. If this parameter is not carried, the device specified in the topic is considered to be the device involved. |
services |
Optional |
List<ServiceEvent> |
Indicates a list of services that the event is about. |
ServiceEvent structure
Parameter |
Mandatory or Optional |
Type |
Description |
---|---|---|---|
service_id |
Mandatory |
String |
Indicates the system field. The value is fixed to $device_config. |
event_type |
Mandatory |
String |
Indicates the system field. The value is fixed to config_update_response. |
event_time |
Optional |
String |
Indicates the time when the event occurs. UTC time format: yyyyMMdd'T'HHmmss'Z'. |
paras |
Mandatory |
Object |
Indicates the event parameters in JSON format. |
paras structure
Parameter |
Mandatory or Optional |
Type |
Description |
---|---|---|---|
result_code |
Mandatory |
Integer |
Indicates the device configuration result.
|
description |
Optional |
String |
Describes the configuration result, such as the cause for configuration failure. |
Example
Topic: $oc/devices/{device_id}/sys/events/up Data format: { "object_device_id":"{object_device_id}", "services":[ { "service_id":"$device_config", "event_type":"config_update_response", "event_time":"20151212T121212Z", "paras":{ "result_code":0, "description":"update config success" } } ] }
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