获取子设备拓扑关系¶
Edge 类型的设备,可以通过该 Topic,获取该设备和关联的子设备拓扑关系。
上行
请求 TOPIC:
/sys/{productKey}/{deviceKey}/thing/topo/get
响应 TOPIC:
/sys/{productKey}/{deviceKey}/thing/topo/get_reply
备注
TOPIC 中的 productKey 和 deviceKey 为网关的三元组。
请求数据格式¶
{
"id":"123",
"version":"1.0",
"params":{},
"method":"thing.topo.get"
}
响应数据格式¶
{
"id":"123",
"code":200,
"data":[
{
"deviceKey":"deviceKey1234",
"productKey":"1234556554"
}
]
}
请求参数说明¶
参数 |
类型 |
是否必需 |
描述 |
---|---|---|---|
id |
String |
必需 |
消息 ID 号,保留值。 |
version |
String |
必需 |
协议版本号,目前协议版本 1.0。 |
method |
String |
必需 |
请求方法 |
响应参数说明¶
参数 |
类型 |
描述 |
---|---|---|
deviceKey |
String |
子设备的 deviceKey。 |
productKey |
String |
子设备的 productKey。 |
code |
Integer |
结果返回码,200 代表请求成功执行。 |
data |
JSON |
返回的详细信息,JSON 格式。 |
结果返回码¶
返回码 |
错误消息 |
释义 |
---|---|---|
1200 |
Parse error, [details] |
解析错误,具体原因需查看[details],最有可能的原因是当前发出请求的设备不是网关类型 |