ClearDeviceDesiredProperty

Last Updated on : 2025-10-10 06:53:52Copy for LLMView as MarkdownDownload PDF

Call this operation to clear the expected property values that have been set on the device.

Instructions for use

  • When calling this interface, you must pass in the property identifier to be emptied ( Identifies ). If not passed in Identifies , the call will fail.

  • A single call to this interface, Identifies up to 10 property identifiers can be passed in.

  • After calling this interface to clear the expected attribute value successfully, call Query Device Desired Property when the interface queries the expected attribute value, the corresponding parameter is returned. Identifier (Property identifier), the corresponding parameter is not returned Value the.

Request Parameters

Name Type Required Sample Values Description
Action String Yes ClearDeviceDesiredProperty System defined parameters. Value: ClearDeviceDesiredProperty.
IoTInstanceID String No Si-2w * * * * 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 product to which the device of the desired attribute value is to be emptied ProductKey .
DeviceName String No Light The name of the device for which you want to empty the desired property value.
Identifies.N RepeatList No Temperature The list of property identifiers to empty the desired property values. The number of attribute identifiers cannot exceed 10.
IoTID String No **** 00100 The ID of the device whose desired attribute value is to be cleared. The ID issued by IoT platform for the device. The unique identifier of the device.

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 If the call fails, an error code is returned. For more information, see  error Code .
Data Struct The data returned when the call is successful.
Versions String {"temperature":0} The latest version number of the expected attribute value of the corresponding attribute after the expected attribute value is cleared this time.
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 Whether the call was successful.

- True : The call succeeded.

- False : The call failed.

Example

Request Example

curl 'https://si-d6e8d8******8958054.tuyacloud.com:8686/?Action=ClearDeviceDesiredProperty&SignatureNonce=abe45b5e072e42a2907c4676c9244dd6&AccessKeyId=xMr9wgwXQLhv5AUa65o03mcD&Identifier.1=rain&SignatureMethod=HMAC-SHA1&Timestamp=2024-11-17T15%3A58%3A08Z&ProductKey=k1ymv1DuLfE&DeviceName=a53b1fa6490e&Signature=2wrlgD3mu6GJdSDPpie0rClWeNk%3D'

Normal Return Example

{
    "RequestId": "E55E50B7-40EE-4B6B-8BBE-D3ED55CCF565",
    "Data": {
        "Versions": "{\"temperature\":0}"
    },
    "Code": "",
    "Success": true
}