調用該接口獲取已發布物模型的擴展描述配置。
QPS限制
單個阿里云賬號調用該接口的每秒請求數(QPS)最大限制為20。
調試
您可以在OpenAPI Explorer中直接運行該接口,免去您計算簽名的困擾。運行成功后,OpenAPI Explorer可以自動生成SDK代碼示例。
請求參數
名稱 | 類型 | 是否必選 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | QueryThingModelExtendConfigPublished |
系統規定參數。取值:QueryThingModelExtendConfigPublished。 |
ProductKey | String | 是 | a1BwAGV**** |
產品的ProductKey。 可以在物聯網平臺控制臺產品頁查看,或調用QueryProductList查看ProductKey的取值。 |
IotInstanceId | String | 否 | iot-cn-0pp1n8t**** |
實例ID。您可在物聯網平臺控制臺的實例概覽頁面,查看當前實例的ID。 注意
實例的更多信息,請參見實例概述。 |
ModelVersion | String | 否 | v1.0.0 |
要獲取的物模型版本號。不傳入此參數,則返回已發布的最新版本。 |
FunctionBlockId | String | 否 | BatteryModule |
物模型自定義模塊標識符,在產品中具有唯一性。 不傳入此參數時,導出默認模塊數據。 |
調用API時,除了本文介紹的該API的特有請求參數,還需傳入公共請求參數。公共請求參數說明,請參見公共參數文檔。
返回數據
名稱 | 類型 | 示例值 | 描述 |
---|---|---|---|
Code | String | iot.system.SystemException |
調用失敗時,返回的錯誤碼。更多信息,請參見錯誤碼。 |
Data | Struct |
調用成功時,返回的數據。 |
|
Configuration | String | {\"profile\":{\"productKey\":\"a114x******\"},\"properties\":[{\"originalDataType\":{\"specs\":{\"registerCount\":1,\"reverseRegister\":0,\"swap16\":0},\"type\":\"bool\"},\"identifier\":\"WakeUpData\",\"registerAddress\":\"0x04\",\"scaling\":1,\"writeFunctionCode\":0,\"operateType\":\"inputStatus\",\"pollingTime\":1000,\"trigger\":1}]} |
物模型擴展描述配置。參數含義請參見CreateThingModel的extendConfig說明。 更多信息,請參見ThingModelJson數據說明。 |
ErrorMessage | String | 系統異常 |
調用失敗時,返回的出錯信息。 |
RequestId | String | E55E50B7-40EE-4B6B-8BBE-D3ED55CCF565 |
阿里云為該請求生成的唯一標識符。 |
Success | Boolean | true |
是否調用成功。
|
示例
請求示例
http(s)://iot.cn-shanghai.aliyuncs.com/?Action=QueryThingModelExtendConfigPublished
&ProductKey=a1BwAGV****
&<公共請求參數>
正常返回示例
XML
格式
<QueryThingModelExtendConfigPublishedResponse>
<Data>
<Configuration>{"profile":{"productKey":"a114x******"},"properties":[{"originalDataType":{"specs":{"registerCount":1,"reverseRegister":0,"swap16":0},"type":"bool"},"identifier":"WakeUpData","registerAddress":"0x04","scaling":1,"writeFunctionCode":0,"operateType":"inputStatus","pollingTime":1000,"trigger":1}]}</Configuration>
</Data>
<RequestId>6DDF9D04-24C3-40D8-B490-2A528E59EA67</RequestId>
<Success>true</Success>
</QueryThingModelExtendConfigPublishedResponse>
JSON
格式
{
"Data": {
"Configuration": "{\"profile\":{\"productKey\":\"a114x******\"},\"properties\":[{\"originalDataType\":{\"specs\":{\"registerCount\":1,\"reverseRegister\":0,\"swap16\":0},\"type\":\"bool\"},\"identifier\":\"WakeUpData\",\"registerAddress\":\"0x04\",\"scaling\":1,\"writeFunctionCode\":0,\"operateType\":\"inputStatus\",\"pollingTime\":1000,\"trigger\":1}]}"
},
"RequestId": "6DDF9D04-24C3-40D8-B490-2A528E59EA67",
"Success": true
}