更新时间:2024-09-14 07:22:19
调用该接口查看指定产品的已发布物模型中的功能定义详情
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | QueryThingModelPublished | 系统规定参数。取值:QueryThingModelPublished。 |
ProductKey | String | 是 | a1BwAGV**** | 产品的** ProductKey**。 |
IotInstanceId | String | 否 | iot-cn-0pp1n8t**** | 实例ID。您可在物联网平台控制台的实例概览 页面,查看当前实例的ID。重要 + 若有ID值,必须传入该ID值,否则调用会失败。 + 若无实例概览 页面或ID值,则无需传入。实例的更多信息,请参见实例概述。 |
ResourceGroupId | String | 否 | rg-acfm4l5tcwd*** | 资源组ID。** 重要** 目前,物联网平台仅支持实例维度的资源组管理。请求参数** ResourceGroupId**配置已无效,无需再传入。 |
ModelVersion | String | 否 | v1.0.0 | 物模型版本号。可调用ListThingModelVersion查看产品下的物模型版本号。为空时返回已发布的最新版本。 |
FunctionBlockId | String | 否 | BatteryModule | 物模型自定义模块标识符,在产品中具有唯一性。不传入此参数时,查询默认模块数据。 |
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
Code | String | iot.system.SystemException | 调用失败时,返回的错误码。更多信息,请参见错误码。 |
Data | Struct | 返回数据。 | |
ThingModelJson | String | {“_ppk”:{“version”:“1594253010934”},“events”:[],“productKey”:“a1BwAGV****”,“properties”:[{“configCode”:“8C03F0EEC63D4897BF2637F89AE36B011594227294067”,“custom”:true,“customFlag”:true,“dataSpecs”:{“custom”:true,“dataType”:“INT”,“max”:“1”,“min”:“0”,“step”:“1”,“unit”:“ppb”},“dataType”:“INT”,“description”:“1”,“extendConfig”:“{\\\“originalDataType\\\”:{\\\“specs\\\”:{\\\“registerCount\\\”:1,\\\“reverseRegister\\\”:0,\\\“swap16\\\”:0},\\\“type\\\”:\\\“bool\\\”},\\\“identifier\\\”:\\\“WakeUpData\\\”,\\\“registerAddress\\\”:\\\“0x04\\\”,\\\“scaling\\\”:1,\\\“writeFunctionCode\\\”:0,\\\“operateType\\\”:\\\“inputStatus\\\”,\\\“pollingTime\\\”:1000,\\\“trigger\\\”:1}”,“identifier”:“WakeUpData”,“name”:“唤醒数据”,“productKey”:“a114xeJGj2p”,“required”:false,“rwFlag”:“READ_ONLY”,“std”:false}],“services”:[]} | 物模型的功能定义。ThingModelJson取值的数据格式说明,请参见ThingModelJson数据说明。 |
ErrorMessage | String | 系统异常 | 调用失败时,返回的出错信息。 |
ProductKey | String | a1BwAGV**** | 产品的ProductKey。 |
RequestId | String | E4C0FF92-2A86-41DB-92D3-73B60310D25E | 涂鸦云为该请求生成的唯一标识符。 |
Success | Boolean | true | 是否调用成功。 + true:调用成功。 + false:调用失败。 |
请求示例
https://iot.****.tuya.com/?Action=QueryThingModelPublished
&ProductKey=a1BwAGV****
&<公共请求参数>
正常返回示例
JSON
格式
{
"RequestId": "1F9041A2-ED5B-4A5A-9C44-598E28C0B434",
"Data": {
"ThingModelJson": "{\"_ppk\":{\"version\":\"1594253010934\"},\"events\":[],\"productKey\":\"a1BwAGV****\",\"properties\":[{\"configCode\":\"8C03F0EEC63D4897BF2637F89AE36B011594227294067\",\"custom\":true,\"customFlag\":true,\"dataSpecs\":{\"custom\":true,\"dataType\":\"INT\",\"max\":\"1\",\"min\":\"0\",\"step\":\"1\",\"unit\":\"ppb\"},\"dataType\":\"INT\",\"description\":\"1\",\"extendConfig\":\"{\\\"originalDataType\\\":{\\\"specs\\\":{\\\"registerCount\\\":1,\\\"reverseRegister\\\":0,\\\"swap16\\\":0},\\\"type\\\":\\\"bool\\\"},\\\"identifier\\\":\\\"WakeUpData\\\",\\\"registerAddress\\\":\\\"0x04\\\",\\\"scaling\\\":1,\\\"writeFunctionCode\\\":0,\\\"operateType\\\":\\\"inputStatus\\\",\\\"pollingTime\\\":1000,\\\"trigger\\\":1}\",\"identifier\":\"WakeUpData\",\"name\":\"唤醒数据\",\"productKey\":\"a114xeJGj2p\",\"required\":false,\"rwFlag\":\"READ_ONLY\",\"std\":false}],\"services\":[]}"
},
"Success": true
}