Thing Creation and Registration

A thing can be created and registered with Device Cloud through either automatic registration or manual thing creation.

To register with Device Cloud, a thing specifies the following when it connects:

  • the TR50 server address (the endpoint shown on the Developer page on the Management Portal)

  • an application token

The application token enables Device Cloud to associate a specific application with a specific organization in Device Cloud. Application tokens must be unique across Device Cloud.

The thing definition is analogous to a class in object-oriented programming; it is a template for defining objects. The thing definition specifies variables, methods, which are procedures for operating on variables, attributes, and properties of things that use the definition. An application has either an explicit or implicit relationship with a thing definition.

To create a thing, you need to create both a thing definition and an application, which creates the application token. Each client or external application connects with a unique thing key. Regardless of whether you use automatic or manual registration, only one application can register with a thing key.

Automatic Registration

To enable a thing to register automatically with Device Cloud, you must associate a thing definition with the application in the application definition. When a client or external application connects to Device Cloud, if the thing key it specifies does not exist in the organization, a thing is automatically created and registration is successful. On the Things page, the thing name appears with the auto: prefix.

Manual Registration

To create a thing manually, you create the thing on the Management Portal or use the thing.create API before the client or external application first tries to connect to Device Cloud.

To create a new thing on the Management Portal, click New Thing on the Things page, and specify the thing key, name, and thing definition. When a client or external application connects to Device Cloud, it must specify the thing key, and it is implicitly associated with an application based on the application token it specifies. It appears on the Thing page on the Management Portal with the name you specify. For more information, see Creating a Thing.

You can also use the thing.create API and specify the thing key and thing definitions in the request parameters. The registration process functions the same way as a thing created on the Management Portal. For more information, see thing.create.