attribute.delete

The attribute.delete command is used to delete an attribute.

TR50 Request


                        // Delete a specific attribute entry
{
  "1": {
    "command": "attribute.delete",
    "params": {
      "id": "56152afb681fdc0cd8052d6e"
    }
  }
}
 
// Delete a group of attribute entries
{
  "1": {
    "command": "attribute.delete",
    "params": {
      "thingKey": "56152afb681fdc0cd8052d6e",
      "key": "myAttribute",
      "startTs": "2017-02-10T09:00:00.000Z",
      "endTs": "2017-02-10T10:00:00.000Z"
    }
  }
}
      
Note:

When you specify a range of attribute entries to be deleted with startTs and endTs, the deletion does not happen immediately but gets into a queue and is deleted later.

Request Parameters

Delete a specific attribute entry.

Name

Type

Required

Description

id

String

Yes

The ID of the attribute to delete.

Delete a group of attribute entries.

Name

Type

Required

Description

thingKey

String

 Yes

The thing key.

key

String

 Yes

The attribute key.

startTs

String

 Yes

The starting timestamp for the date range to delete.

endTs

String

 Yes

The ending timestamp for the date range to delete.

TR50 Response

If the command is sent successfully a success message is returned. Otherwise, an error and error message will be returned.


                        {
  "cmd": {
    "success": true
  }
}