Get Topological Relationships of Sub-devices¶
An edge can publish a message to this topic to retrieve the topological relationship between the edge and a sub-device.
Upstream
Request TOPIC:
/sys/{productKey}/{deviceKey}/thing/topo/getReply TOPIC:
/sys/{productKey}/{deviceKey}/thing/topo/get_reply
Note
The productKey and deviceKey in the TOPIC are the credentials of the edge.
Sample Request Format¶
{
  "id": "123",
  "version": "1.0",
  "params": {},
  "method": "thing.topo.get"
}
Sample Response Format¶
{
  "id": "123",
  "code": 200,
  "data": [
    {
      "deviceKey": "deviceKey1234",
      "productKey": "1234556554"
    }
  ]
}
Request Parameter Description¶
Parameter  | 
Type  | 
Mandatory/Optional  | 
Description  | 
id  | 
Long  | 
Mandatory  | 
The message ID. It is a reserved parameter that is reserved for future use.  | 
version  | 
String  | 
Mandatory  | 
The version of the protocol. The current version is 1.0.  | 
params  | 
Object  | 
Optional  | 
The parameters used for getting the topological relationships.  | 
method  | 
String  | 
Mandatory  | 
The request method.  | 
Response Parameter Description¶
Parameter  | 
Type  | 
Mandatory/Optional  | 
Description  | 
|---|---|---|---|
code  | 
Integer  | 
Mandatory  | 
The return code. “200” indicates that the requested operation is executed successfully.  | 
data  | 
JSON  | 
Optional  | 
The detailed returned information in JSON format.  | 
deviceKey  | 
String  | 
Mandatory  | 
The device key of the sub-device.  | 
productKey  | 
String  | 
Mandatory  | 
The product key of the sub-device.  | 
Return Code¶
Return Code  | 
Error Message  | 
Explanation  | 
|---|---|---|
1200  | 
Parse error, [details]  | 
An error occured during parsing. You need to read the [details] for troubleshooting. The most common cause is that the device making the request is not a gateway device.  |