thing.bind

The thing.bind command is used to bind a thing to the current session.

This command requires that the session in use is authenticated as an application using an application token.

TR50 Request

{
  "cmd": {
    "command": "thing.bind",
    "params": {
      "key": "mything",
      "autoDefKey": "mydef",
      "bindTo": "myparentthing"
    }
  }
}

Request Parameters

Name

Type

Required

Description

key

String

Yes

Identifies the thing to bind to the session.

autoDefKey

String

 

Identifies the thing definition to use to create the thing when it does not already exist.

autoDefThingName

String

 

If the thing is auto-defined as a result of the bind, specifies the thing name to use. if not specified, the name is set to auto:thingkey.

autoDefTags

String array

 

If the thing is auto-defined as a result of the bind, specifies the tags to addd to the thing.

autoDefSecTags

String array

 

If the thing is auto-defined as a result of the bind, specifies the security tags to add to the thing.

bindTo

String

 

Specifies the thing key of the parent to which to bind the thing. If not specified, the thing is bound to the thing specified in the current session.

TR50 Response

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

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