Set Desired Property

Last Updated on : 2023-11-23 06:19:33download

Store the command of sending device properties in the cloud. When the device is woken up or goes online, the command is sent from the cloud to the device. Currently, this feature is only available for some low-power devices.

API address

POST: /v2.0/cloud/thing/{device_id}/shadow/properties/desired

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringpathtrueThe device ID.

Description of body

Parameter nameTypeINRequiredDescription
propertiesStringbodytrueThe properties supported by the device and the property value set.
durationLongbodytrueThe validity period of the specified desired property value.

Return parameter

Parameter nameTypeDescription
resultJSONThe returned data.
successBooleanIndicates whether the operation is successful. Valid values:
  • true: The operation succeeded.
  • false: The operation failed.
tLongThe timestamp.
tidStringThe link ID.

Request example

POST: /v2.0/cloud/thing/vdevo1638******/shadow/properties/desired
{
  "properties": {
    "switch_1": true
  },
  "duration": 1000
}

Return example

{
    "tid": "77a9807fb74411edb9d75a827c79edfd",
    "result": {
    },
    "t": 1677574021435,
    "success": true
}

Error code

For more information, see error code.

Limits on API Request Frequency

For more information, see Limits on API Request Frequency.