QueryDeviceDesiredProperty

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

Call this operation to query the expected attribute value of a specified device.

Instructions for use

  • Read-only properties do not support querying for expected property values.

  • One call can query the expected value of up to 10 attributes.

Request Parameters

Name Type Required Sample Values Description
Action String Yes QueryDeviceDesiredProperty System defined parameters. Value: QueryDeviceDesiredProperty.
IotInstanceID String No Iot_instc_pu ****_C *-v64 * * * * * * * * The instance ID. In the IoT Platform console, you can instance Overview page to view the current instance’s ID .
ProductKey String No A1BwAGV * * * * The ProductKey of the device to be queried.
DeviceName String No Light the name of the device to be queried.
Identifier.N RepeatList No Temperature A list of identifiers of the attributes for which you want to query the expected value. The attribute identifier of the device. You can view the attribute identifier of the product to which the device belongs in the console.

- A single call can pass in up to 10 identifiers.

- You cannot enter duplicate attribute identifiers.

- If this parameter is not passed in, the expected values of all attributes of the device are returned.
IoTID String No **** 00100 The device ID. The ID issued by IoT platform for the device. The unique identifier of the device.
FunctionBlockID String No BatteryModule The object model custom module identifier, which is unique in the product. If this parameter is not specified, the data of the default module is queried.

Note: When calling an API, in addition to the API-specific request parameters described in this topic, you must also pass in the common request parameters. For more information about common request parameters, see Common parameters.

Return Data

Name Type Sample Values Description
Code String Iot.system.SystemException The error code returned when the call fails. For more information, see Error codes.
Data Struct When the call is successful, the data returned ( List ).
List Array of DesiredPropertyInfo The expected property information returned ( Desired Property Info ).
DesiredPropertyInfo
DataType String int Property data type.
Identifier String Temperature The property identifier.
Name String Airconditioning The property name.
Time String 1579335899000 Expected property value modification time, in milliseconds.
Unit String Attribute unit.
Value String 34 Expected property value.
Version Long 1 The version number of the current expected property value.
ErrorMessage String System Exception Error information returned when the call fails.
RequestID String E55E50B7-40EE-4B6B-8BBE-D3ED55CCF565 The unique identifier generated by the request.
Success Boolean True Indicates whether the call succeeded.

- True : The call succeeded.

- False : The call failed.

Example

Request Example

curl 'https://si-d6e8******48958054.tuyacloud.com:8686/?Action=QueryDeviceDesiredProperty&SignatureNonce=16f723ce574e4751be61ada48610780c&AccessKeyId=xMr9wgwXQLhv5AUa65o03mcD&Identifier.1=rain&SignatureMethod=HMAC-SHA1&Timestamp=2024-11-17T15%3A53%3A31Z&ProductKey=k1ymv1DuLfE&DeviceName=a53b1fa6490e&Signature=UeZsON8sCElbcDRXBa5Z6s3M%2FVs%3D'

Normal Return Example

{
  "Data": {
    "List": {
      "DesiredPropertyInfo": [
        {
          "Name": "temperature", 
          "Value": "35", 
          "Time": "1581778567154", 
          "DataType": "float", 
          "Version": 1, 
          "Identifier": "Temperature", 
          "Unit": "°C"
        }
      ]
    }
  }, 
  "RequestId": "F0B1F7C8-A799-44C3-BDF8-1B8F9E91E675", 
  "Success": true
}