thing.def.change

The thing.def.change command is used to change the definition of a thing.

TR50 Request


                        {
  "cmd": {
    "command": "thing.def.change",
    "params": {
      "key": "mycar",
      "newDefKey": "connectedcar",
      "dropProps": false,
      "dropAttrs": true,
      "dropAlarms": true
  }
}
      

Request Parameters

Name

Type

Required

Description

key

String

Yes

The key of the thing.

newDefKey

String

Yes

The key of the new thing definition.

dropAlarms

Boolean

Yes

Whether to drop alarms missing in the destination definition.

dropAttrs

Boolean

Yes

Whether to drop attributes missing in the destination definition.

dropProps

Boolean

Yes

Whether to drop properties missing in the destination definition.

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
  }
}