首页 > 解决方案 > 在 azure iot Central 的执行命令链接中在哪里可以找到 components 键

问题描述

**[11:12] Umer Saleem 正在处理它,先生,在此示例链接中,组件名称是什么以及如何找到它 POST https://{subdomain}.{centralDnsSuffixInPath}/api/preview/devices/{device_id} /components/{component_name}/commands/{command_name} **

标签: androidazureazure-iot-central

解决方案


要了解此设备有哪些组件,您可以发出 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”。它们是您的接口的名称。


推荐阅读