# ClearDeviceDesiredProperty

调用该接口清空设备已设置的期望属性值。

# 使用说明

  • 调用本接口时,必须传入要清空的属性标识符(Identifies)。如果不传入Identifies,调用会失败。
  • 调用本接口清空期望属性值成功后,调用QueryDeviceDesiredProperty接口查询期望属性值时,会返回对应参数Identifier(属性标识符),不会返回对应参数Value了。

# 请求参数

# 请求方式1

名称 类型 是否必选 示例值 描述
Action String ClearDeviceDesiredProperty 系统规定参数。取值:ClearDeviceDesiredProperty。
IotInstanceId String 70255861902711*** 实例ID。您可在物联网平台控制台的实例概览页面,查看当前实例的ID
ProductKey String a1BwAGV**** 要查询的设备所隶属的产品Key。
DeviceName String light 指定的设备的名称。
Identifies.N RepeatList Temperature 要清空期望属性值的属性标识符列表。

# 请求方式2

名称 类型 是否必选 示例值 描述
Action String ClearDeviceDesiredProperty 系统规定参数。取值:ClearDeviceDesiredProperty。
IotInstanceId String 70255861902711*** 实例ID。您可在物联网平台控制台的实例概览页面,查看当前实例的ID
IotId String 70255861902711**** 设备ID。
Identifies.N RepeatList Temperature 要清空期望属性值的属性标识符列表。

# 返回数据

名称 类型 示例值 描述
Code String iot.system.SystemException 调用失败时,返回的错误码。
Data Struct 调用成功时,返回的数据。
Versions String {"temperature":1} 本次清空期望属性值后,对应属性的期望属性值的最新版本号。
ErrorMessage String 系统异常 调用失败时,返回的出错信息。
RequestId String 2E6yNiZUHPeisuwWWbpxwabzf9LdmSWJ 平台为该请求生成的唯一标识符。
Success Boolean true 表示是否调用成功。true:调用成功。false:调用失败。

# 示例

请求示例

http://open.${区域}.fenydata.com/fenydata-java-open/?Action=ClearDeviceDesiredProperty
&IotInstanceId=70255861902711****
&ProductKey=a1BwAGV****
&DeviceName=light
&Identifies.1=int1
&<公共请求参数>

正常返回示例

XML格式

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xml>
  <RequestId>c69985ffbe284845a9340c288f45b3af</RequestId>
  <Data>
    <Versions>{"temperature1":3,"temperature2":4}</Versions>
  </Data>
  <Success>true</Success>
</xml>

JSON格式

{
  "RequestId": "38738b26952d435a8503f4d1e3244bf7",
  "Data": {
    "Versions": "{\"temperature1\":2,\"temperature2\":3}"
  },
  "Success": true
}