Platform Notifying a Gateway of Child Device Deletion
Function
This API is used by the platform to notify a gateway of the information about a deleted child device. For details about the relationship between a gateway and its child devices, see Gateway and Child Devices.
Topic
Downstream: $oc/devices/{device_id}/sys/events/down
Parameters
Parameter |
Mandatory/Optional |
Type |
Description |
---|---|---|---|
object_device_id |
Optional |
String |
Explanation: The value is the same as that of device_id in the topic. |
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 $sub_device_manager. |
event_type |
Mandatory |
String |
Explanation: System field. Value range: Fixed at delete_sub_device_notify. |
event_time |
Optional |
String |
Explanation: Event time. UTC time format: yyyyMMdd'T'HHmmss'Z'. |
paras |
Mandatory |
Object |
Explanation: Event parameters in JSON format. |
paras structure
Parameter |
Mandatory/Optional |
Type |
Description |
---|---|---|---|
devices |
Mandatory |
List<DeviceInfo> |
Explanation: List of devices. |
version |
Mandatory |
Long |
Explanation: Version of the child device information. |
DeviceInfo structure
Parameter |
Mandatory/Optional |
Type |
Description |
---|---|---|---|
parent_device_id |
Mandatory |
String |
Explanation: Parent device ID. |
node_id |
Optional |
String |
Explanation: Indicates the node ID. |
device_id |
Mandatory |
String |
Explanation: Device ID. |
Example
Topic: $oc/devices/{device_id}/sys/events/down Data format: { "object_device_id": "{object_device_id}", "services": [{ "service_id": "$sub_device_manager", "event_type": "delete_sub_device_notify", "event_time": "20151212T121212Z", "paras": { "devices": [{ "parent_device_id": "c6b39067b0325db34663d3ef421a42f6_12345678", "node_id": "subdevice11", "device_id": "2bb4ddba-fb56-4566-8577-063ad2f5a6cc" }], "version": 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