Gateway Requesting for Deleting Child Devices
Function
This API is used by a gateway to deregister child devices on the platform. For details about the relationship between a gateway and its child devices, see Gateway and Child Devices.
Topic
Upstream: $oc/devices/{device_id}/sys/events/up
Parameters
Parameter |
Mandatory/Optional |
Type |
Description |
---|---|---|---|
object_device_id |
Optional |
String |
Explanation: This parameter is not in use currently and does not need to be set. |
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_request. |
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. |
event_id |
Optional |
String |
Explanation: Uniquely identifies an event. If this parameter is not carried, an event ID will be generated by the platform. An event ID is a random string of 36 characters consisting of letters, numbers, and hyphens (-). |
paras |
Mandatory |
Object |
Explanation: Event parameters in JSON format. |
paras structure
Parameter |
Mandatory/Optional |
Type |
Description |
---|---|---|---|
devices |
Mandatory |
List<String> |
Explanation: List of child devices to delete. Up to 50 child devices can be deleted at a time. |
Example
Topic: $oc/devices/{device_id}/sys/events/up Data format: { "object_device_id": "{object_device_id}", "services": [ { "service_id": "$sub_device_manager", "event_type": "delete_sub_device_request", "event_time": "20151212T121212Z", "event_id": "40cc9ab1-3579-488c-95c6-c18941c99eb4", "paras": { "devices": [ "c6b39067b0325db34663d3ef421a42f6_subdevice11", "c6b39067b0325db34663d3ef421a42f6_subdevice12" ] } } ] }
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