Response for Adding a Gateway Subdevice
Topic
Topic |
/v1/devices/{gatewayId}/topo/addResponse |
---|---|
Publisher |
IoT platform |
Subscriber |
Edge device |
Parameter Description
After a subdevice is added successfully, a response containing information about the new subdevice is returned. During secondary development, information about the new subdevice needs to be saved locally. The returned deviceId field is used for reporting subdevice data, updating the subdevice status, and deleting the subdevice.
Response parameter description
Field |
Mandatory/Optional |
Type |
Description |
---|---|---|---|
mid |
Mandatory |
Integer |
Command ID. |
statusCode |
Mandatory |
Integer |
Result code for request processing. The options are as follows:
|
statusDesc |
Optional |
String |
Response status description. |
data |
Mandatory |
List< AddDeviceRsp > |
Information about the added subdevice. |
AddDeviceRsp struct description
Field |
Mandatory/Optional |
Type |
Description |
---|---|---|---|
statusCode |
Mandatory |
Integer |
Result code for request processing. The options are as follows:
|
statusDesc |
Optional |
String |
Response status description. |
deviceInfo |
Optional |
DeviceInfo |
Device information. |
DeviceInfo struct description
Field |
Mandatory/Optional |
Type |
Description |
---|---|---|---|
nodeId |
Mandatory |
String |
Device identifier. The value must contain 2 to 64 characters and can consist of only uppercase and lowercase letters, digits, and hyphens (-). |
deviceId |
Mandatory |
String |
Unique device ID generated by the IoT platform, which corresponds to the device client ID. |
name |
Mandatory |
String |
Device name. The value must contain 2 to 64 characters and can consist of only uppercase and lowercase letters, digits, hyphens (-), and number signs (#). |
description |
Optional |
String |
Device description. The value length cannot exceed 200 characters. |
manufacturerId |
Mandatory |
String |
Manufacturer ID. The value must contain 2 to 50 characters and can consist of only uppercase and lowercase letters, digits, hyphens (-), and underscores (_). |
model |
Mandatory |
String |
Product model. The value must contain 2 to 50 characters and can consist of only uppercase and lowercase letters, digits, hyphens (-), and underscores (_). |
Example
{ "data": [{ "deviceInfo": { "manufacturerId": "Test_n", "name": "n-device", "model": "A_n", "nodeId": "n-device", "deviceId": "D59eGSxy" }, "statusCode": 0 }], "mid": 7, "statusCode": 0 }
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