QueryThingModelPublished

Last Updated on : 2025-10-10 06:53:28Copy for LLMView as Markdown

Call this interface to view the function definition details in the published object model of the specified product.

Request Parameters

Name Type Required Example Value Describe
Action String YES QueryThingModelPublished System specified parameter. Value:QueryThingModelPublished。
ProductKey String YES A1BwAGV**** Product ProductKey

Note: When calling the API, in addition to the API-specific request parameters described in this article, you also need to pass in the public request parameters. For a description of the public request parameters, see the public parameter documentation.

Return data

Name Type Example Value Describe
Code String Iot.system.SystemException The error code returned when the call fails. For more information, see Error codes.
Data Struct Returns data.
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 “:\ "{" Raw Data Type” :{” Specification” :{” Register Count” :1,” reverseRegister” :0,” swap16” :0},” Type” :” Boolean” },” Identifier” :” WakeupData” ,” Register Address” :” 0x04” ,” Scaling” :1 " Write Function Code” :0 " Operation Type” :” Input Status” ,” Polling Time” :1000,” Trigger” :1}”,” Identifier” :” WakeupData” ,” Name” :” WakeupData” ,"ProductKey" :"a114xeJGj2p" ,"Required" :false,"rwFlag" :"ReadOnly" ,"Standard" : false}], "Services":[]} Functional definition of the thing model.
ErrorMessage String System abnormality When the call fails, the error message is returned.
ProductKey String A1BwAGV**** Product ProductKey
RequestId String E4C0FF92-2A86-41DB-92D3-73B60310D25E A unique identifier generated for this request.
Success Boolean True Whether the call was successful.

●true: The call was successful.

●false: The call failed.

Example

Request example

curl 'https://si-d6e8d81******58054.tuyacloud.com:8686/?Action=QueryThingModelPublished&SignatureNonce=345b515a360641e8b28f5d6382975e44&AccessKeyId=xMr9wgwXQLhv5AUa65o03mcD&SignatureMethod=HMAC-SHA1&Timestamp=2024-11-19T08%3A09%3A15Z&ProductKey=k1ymv1DuLfE&Signature=UEhcFgjgZfyck6zRP1qbuZEPwGk%3D'

Normal return example

{
    "Data": {
        "ThingModelJson": "{\"services\":[],\"properties\":[{\"identifier\":\"rain\",\"dataSpecs\":{\"min\":\"1\",\"max\":\"100\",\"dataType\":\"INT\",\"step\":\"1\"},\"dataType\":\"INT\",\"rwFlag\":\"READ_WRITE\",\"name\":\"测试\"},{\"identifier\":\"LightSwitch\",\"dataType\":\"BOOL\",\"rwFlag\":\"READ_WRITE\",\"name\":\"LightSwitch\",\"dataSpecsList\":[{\"dataType\":\"BOOL\",\"name\":\"关闭\",\"value\":0},{\"dataType\":\"BOOL\",\"name\":\"开启\",\"value\":1}]}],\"events\":[],\"productKey\":\"k1ymv1DuLfE\",\"_ppk\":\"{}\"}"
    },
    "RequestId": "95ab9074-0502-434f-b8d3-547c7b6adddb",
    "Code": "",
    "Success": true
}