調用該接口查看指定產品的已發布物模型中的功能定義詳情。

QPS限制

單個阿里云賬號調用該接口的每秒請求數(QPS)最大限制為10。

說明 單個阿里云賬號下的所有RAM用戶共享該阿里云賬號的配額。

調試

您可以在OpenAPI Explorer中直接運行該接口,免去您計算簽名的困擾。運行成功后,OpenAPI Explorer可以自動生成SDK代碼示例。

請求參數

名稱 類型 是否必選 示例值 描述
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

物模型自定義模塊標識符,在產品中具有唯一性。

不傳入此參數時,查詢默認模塊數據。

調用API時,除了本文介紹的該API的特有請求參數,還需傳入公共請求參數。公共請求參數說明,請參見公共參數文檔

返回數據

名稱 類型 示例值 描述
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.cn-shanghai.aliyuncs.com/?Action=QueryThingModelPublished
&ProductKey=a1BwAGV****
&<公共請求參數>

正常返回示例

XML格式

<QueryThingModelPublishedResponse>
    <RequestId>1F9041A2-ED5B-4A5A-9C44-598E28C0B434</RequestId>
    <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":"a114xeJ****","required":false,"rwFlag":"READ_ONLY","std":false}],"services":[]}</ThingModelJson>
    </Data>
    <Success>true</Success>
</QueryThingModelPublishedResponse>

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
}