Delete Attributes


A device can publish a message to this topic to delete the attributes from the cloud.


Upstream

  • Request TOPIC: /sys/{productKey}/{deviceKey}/thing/attribute/delete

  • Reply TOPIC: /sys/{productKey}/{deviceKey}/thing/attribute/delete_reply

Sample Request Format

{
  "id": "123",
  "version": "1.0",
  "params": {
    "attributes": ["attr1", "attr2", "attr3"]
  },
  "method": "thing.attribute.delete"
}

Sample Response Format

{
  "id": "123",
  "code": 200,
  "data": {}
}

Request Parameter Description

Parameter

Type

Mandatory/Optional

Description

id

String

Optional

The message ID. It is a reserved parameter that is reserved for future use.

version

String

Mandatory

The version of the protocol. The current version is 1.0.

params

List

Mandatory

The parameters used for deleting the attributes.

attributes

Array

Optional

The list of the device’s attributes’ identifiers. A request can carry a maximum of 200 attributes. When not specified, no attribute is deleted.

method

String

Mandatory

The request method.

Response Parameter Description

Parameter

Type

Mandatory/Optional

Description

code

Integer

Mandatory

The return code. “200” indicates that the requested operation is executed successfully.

Return Code

Return Code

Error Message

Explanation

1209

Attribute delete data format error

Invalid request format.