Modify Properties

Last Updated on : 2023-11-23 06:17:48download

Based on the device ID, modify the property status reported by the device to the cloud. Currently, you can only modify the custom name of a property.

API address

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

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueThe device ID.

Description of body

Parameter nameTypeINRequiredDescription
propertiesList trueThe list of the device property objects.

Description of properties

Parameter nameTypeINRequiredDescription
codeString trueThe code of the specified property.
custom_nameString trueThe custom name of the specified property.

Return parameter

Parameter nameTypeDescription
resultBooleanThe returned result. Valid values:
  • true: The operation succeeded.
  • false: The operation failed.

Request example

POST: /v2.0/cloud/thing/372817193*****/shadow/properties
{
  "properties": [
    {
      "code": "switch_led",
      "custom_name": "switch_led1"
    }
  ]
}

Return example

{
    "result": true,
    "t": 1591872112140,
    "success": true
}

Error code

For more information, see error code.

Limits on API Request Frequency

For more information, see Limits on API Request Frequency.