android - 在 azure iot Central 的执行命令链接中在哪里可以找到 components 键
问题描述
**[11:12] Umer Saleem 正在处理它,先生,在此示例链接中,组件名称是什么以及如何找到它 POST https://{subdomain}.{centralDnsSuffixInPath}/api/preview/devices/{device_id} /components/{component_name}/commands/{command_name} **
解决方案
要了解此设备有哪些组件,您可以发出 GET 请求
https://{subdomain}.{centralDnsSuffixInPath}/api/preview/devices/{device_id}/components/
这将向您显示组件,示例响应可以是:
{
"value": [
{
"@id": "urn:machine:MyMachine:lxhc64xu:1",
"@type": [
"InterfaceInstance"
],
"name": "cb_7d7",
"displayName": "Interface"
},
{
"@id": "urn:machine:MyMachine:_lyh_e2x:1",
"@type": [
"InterfaceInstance"
],
"name": "cb_282",
"displayName": "Properties"
}
]
}
{component} 的名称是您在响应中获得的值的名称。在我的示例中,您可以使用“cb_7d7”或“cb_282”。它们是您的接口的名称。
推荐阅读
- react-native - 返回上一个屏幕时重新获取usequery在本机反应中不起作用
- python - 我无法获得下面的代码片段来输出正确的结果
- c++ - C++ - 从文本文件中读取表格
- chromium - 如何允许在无头铬上获得地理定位
- scp - 尝试在 nohup 进程中进行 scp 时出现 pexpect 错误
- python-3.x - 使用正则表达式获取赛后信息
- google-apps-script - Google 表格 - 基本脚本
- algorithm - 什么是高效的“修改”金矿问题算法?
- sql - oracle 12c 上的 REPLACE 过程
- python - Docker,chatwoot TypeError:预期的 str、字节或 os.PathLike 对象,而不是 NoneType