Request Headers (Applies to all methods)
GET
/api/apps/{appID}/things/VENDOR_THING_ID:{vendorThingID}
Retrieve the thing information.
The administrator, a thing owner, and thing itself can perform this operation.
Content-Type application/json
Content-Type application/vnd.kii.ThingRetrievalResponse+json
Name | Type | Description |
---|---|---|
_thingID | string | The identifier of the thing generated by Kii Cloud. |
_vendorThingID | string | The provided identifier of the thing. |
_thingType | string | The type of the thing. |
_vendor | string | The vendor of the thing. |
_firmwareVersion | string | The firmware version of the thing. |
_productName | string | The product name. |
_lot | string | The production lot. |
_created | long | The creation date of the thing in UNIX epoch format (msec in UTC). |
_stringField1 | string | The field for storing arbitrary string data. |
_stringField2 | string | The field for storing arbitrary string data. |
_stringField3 | string | The field for storing arbitrary string data. |
_stringField4 | string | The field for storing arbitrary string data. |
_stringField5 | string | The field for storing arbitrary string data. |
_numberField1 | long | The field for storing arbitrary numeric data. |
_numberField2 | long | The field for storing arbitrary numeric data. |
_numberField3 | long | The field for storing arbitrary numeric data. |
_numberField4 | long | The field for storing arbitrary numeric data. |
_numberField5 | long | The field for storing arbitrary numeric data. |
Content-Type application/vnd.kii.ThingNotFoundException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "THING_NOT_FOUND". |
message | string | The error message. |
field | string | The field used for searching the thing. This can be the "thingID" or "vendorThingID" field. |
value | string | The field value used for searching the thing. |
appID | string | The ID of the application. |
Content-Type application/vnd.kii.UnauthorizedAccessException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "UNAUTHORIZED". |
message | string | The error message. |
authenticatedAppID | string | The authenticated appID. |
authenticatedPrincipalID | string | The authenticated principal ID (userID or thingID). |
PATCH
/api/apps/{appID}/things/VENDOR_THING_ID:{vendorThingID}
Modify the thing information.
For the predefined fields. the fields can be added or updated, but not deleted. If a field is not provided in the request, the field will be left untouched.
For the custom fields, the fields are updated as a whole. In other words, all fields in the request will be stored as is. The fields not provided in the request will be therefore deleted.
Content-Type application/vnd.kii.ThingUpdateRequest+json
The data for updating the thing.
Content-Type application/vnd.kii.ThingUpdateResponse+json
Name | Type | Description |
---|---|---|
modifiedAt | long | The modification date of the thing in Unix epoch (milliseconds in UTC). |
Content-Type application/vnd.kii.ThingNotFoundException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "THING_NOT_FOUND". |
message | string | The error message. |
field | string | The field used for searching the thing. This can be the "thingID" or "vendorThingID" field. |
value | string | The field value used for searching the thing. |
appID | string | The ID of the application. |
Content-Type application/vnd.kii.ValidationException+json
- The value of a thing field is invalid
- The custom fields exceed the maximum allowed size
Name | Type | Description |
---|---|---|
errorCode | string | Error code "INVALID_INPUT_DATA". |
message | string | The error message. |
Content-Type application/vnd.kii.UnauthorizedAccessException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "UNAUTHORIZED". |
message | string | The error message. |
authenticatedAppID | string | The authenticated appID. |
authenticatedPrincipalID | string | The authenticated principal ID (userID or thingID). |
HEAD
/api/apps/{appID}/things/VENDOR_THING_ID:{vendorThingID}
Check if the thing is already registered.
No security is involved. Anyone can perform this operation.
Content-Type application/json
- Authorization Basic: header for granting an anonymous access.
- Set a Base64-encoded string of AppID and AppKey concatenated with a colon (APP_ID:APP_KEY).
- The header should look like:
Authorization: Basic czZCaGRSa3F0Mzo3RmpmcDBaQnIxS3REUmJuZlZkbUl3 - Authorization Bearer: using Oauth2 Bearer Token.
- The header should look like:
Authorization: Bearer ht5fpHQAyrPPwLftK1rAqllv5WNVPCnYfPiCvPocFuQ
Content-Type (None)
Content-Type (None)
DELETE
/api/apps/{appID}/things/VENDOR_THING_ID:{vendorThingID}
Unregister the thing. It will also remove all thing data (buckets and objects) and ownerships. All the access tokens related with the thing will be invalidated also.
The administrator, a thing owner, and the thing itself can perform this operation.
Content-Type application/json
Content-Type (None)
Content-Type application/vnd.kii.ThingNotFoundException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "THING_NOT_FOUND". |
message | string | The error message. |
field | string | The field used for searching the thing. This can be the "thingID" or "vendorThingID" field. |
value | string | The field value used for searching the thing. |
appID | string | The ID of the application. |
Content-Type application/vnd.kii.UnauthorizedAccessException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "UNAUTHORIZED". |
message | string | The error message. |
authenticatedAppID | string | The authenticated appID. |
authenticatedPrincipalID | string | The authenticated principal ID (userID or thingID). |