Thing Management

Kii Cloud lets you manage things by offering the following features.

Register a thing

First of all, you need to register a thing. By registering the thing, it is acknowledged by the Kii Cloud.

How to register depends on how you are going to use the SDK.

  • Using the features of both the Thing-IF SDK and Kii Cloud SDK for Thing

    As explained in Thing and owner, you will use the onboarding API of the Thing-IF SDK to register a thing and assign the thing owner at the same time.

    The onboarding process of the Thing-IF SDK only supports the setting of some of the predefined fields shown below.

  • Using only the features of the Kii Cloud SDK for Thing

    In this case, you will use the thing registration API of the Kii Cloud SDK for Thing. This API will register the thing. The feature of the API is described in below.

    The registration process of the Thing SDK Embedded only supports the setting of some of the predefined fields shown below.

When registering a thing, you can also set various attributes as the thing information field values. The following table summarized the available predefined fields.

Fields Description Mandatory?
_vendorThingID ID assigned by the thing vendor. Any string with alphanumeric, hyphen, underscore and period up to 200 characters is accepted as long as it is unique in the application. This field value cannot be modified later. Yes
_password The password for the thing. Yes
_thingType A type of the thing. Any string with alphanumeric, hyphen, underscore and period up to 100 characters is accepted. No
_vendor A name of the thing vendor. Any string with alphanumeric, hyphen, underscore and period up to 100 characters is accepted. No
_firmwareVersion A firmware version of the thing. Any string with alphanumeric, hyphen, underscore and period up to 100 characters is accepted. No
_productName A product name of the thing. Any string with alphanumeric, hyphen, underscore and period up to 100 characters is accepted. No
_lot A lot number of the thing. Any string with alphanumeric, hyphen, underscore and period up to 100 characters is accepted. No
_stringField1 to _stringField5 5 free string fields available for a developer (e.g., putting some text for indexing purpose). Any string with alphanumeric, hyphen, underscore and period up to 100 characters is accepted. No
_numberField1 to _numberField5 5 free number fields available for a developer (e.g., putting some numbers for indexing purpose). Long data type is accepted. No

Also, you can add your custom fields with any names as long as they follow the following rules:

  • The whole size of a custom field (field name + value), when they are converted to the JSON format, should not exceed 63 KB.
  • The field name should not start with "_" (underscore).

Unlike the predefined fields, the custom fields are not indexed, so you will not be able to query by them. The value can have any JSON value, including nested JSONs and arrays.

The API for querying things is currently not available. You can query for thing on the developer portal.

Upon the thing registration, Kii Cloud performs the followings:

  • Issues a unique thingID for identifying the thing.
  • Issues an access token for the thing (optional).
  • Creates a dedicated scope for the thing.

Click the links below for sample code.
Client SDK REST

Check if a thing is registered

Any authenticated users and things can check if a thing is registered in the backend.

Click the links below for sample code.
REST

Get an access token

Just like a user getting his access token by submitting his username and password, a thing can get its access token by submitting its vendorThingID and password.

Click the links below for sample code.
REST

Manipulate the thing information

A thing, its owners and administrators can retrieve the thing information (fields). They can also update the thing information.

Click the links below for sample code.
Client SDK REST

Manipulate the thing status (enabling and disabling)

The thing owners and administrators can disable the thing. If the thing is disabled, the thing is "locked" and it will not be able to access its data resources (i.e., buckets and objects in the thing scope). The data resources themselves are kept in the backend, and the thing owners and the administrators can still access them. The feature is useful, for example, when the thing is lost or stolen, and you want to temporarily lock the thing.

Of course, the thing owners and administrators can later re-enable the thing. Once the thing is enabled, it is "unlocked" and it will regain the access to its data resources.

Click the links below for sample code.
Client SDK REST

Unregister the thing

A thing, its owners and administrators can unregister the thing. Once the thing is unregistered, all its data resources (i.e., buckets and objects) are deleted from Kii Cloud.

Click the links below for sample code.
Client SDK REST

Force change thing password

The application administrator can force change a thing's password. This feature is designed to handle the situation like a thing password being leaked.

Click the links below for sample code.
REST