Azure IoT中心-创建设备组时查询失败



我正在尝试创建设备组,以最终使用此特定设备组创建作业,从而向其中的所有设备发送重新启动命令。我正在使用IoT Central API REST,URL如下所示(这就是他们文档中的内容(:PUT https://{subdomain}.{baseDomain}/api/deviceGroups/{uuidCreatedByMe}?api-version=2022-07-31

请求上的正文看起来像这样:

{
description: `Pulses' group to be rebooted, created at ${DateTime.now().toISO()}`,
displayName: `Reboot group ${deviceGroupId}`,
filter: query,
}

查询与此非常相似

SELECT * FROM devices WHERE $template = "templateId" AND $id IN ["deviceId1", "deviceId2"]

但出于某种原因,当我发送请求时,它会返回一个错误:

Request failed with status 500 and error: {
"code": "InternalServerError",
"message": "Something went wrong on our end. Please try again. You can contact support at https://aka.ms/iotcentral-support. Please include the following information. Request ID: requestId, Time: Tue, 06 Sep 2015 477:10:01 GMT.",
"requestId": "requestId",
"time": "Tue, 06 Sep 2022 16:10:01 GMT"
}

但是,当我尝试创建作业并获取设备组列表时,这会显示我一直试图创建的所有设备组,但它不允许我查看设备数量,也不允许我继续创建作业。然后,我通过RESTneneneba API请求删除具有其中一个id的设备组,它会很好地删除它。

我的问题是…

这与查询有关吗?或者到底是什么?。。。

因为根据他们的文档,这是一个有效的查询

我可以确认它还不受支持,现在尝试使用($id= '' OR $id = '')解决问题。

最新更新