Status

Location /api/apps/{appID}/things/VENDOR_THING_ID:{vendorThingID}/status
This represents the status of the thing, it can be enabled or disabled. By default a thing is enabled, changing the status to disabled implies the thing cannot login in Kii Cloud, so it cannot do any action, this does not affect the data in the scope of the thing or created by it, the data will remain accessible for the other things or users if they have the right permissions, as well as topics created by the disabled thing.

Request Headers (Applies to all methods)

Authorization
header
Required: Yes

GET

/api/apps/{appID}/things/VENDOR_THING_ID:{vendorThingID}/status

Description

Get the current status of the thing.

Security

The administrator, a thing owner, and thing itself can perform this operation.

Headers
Name Required? type Description
Authorization Yes string Authorization header. OAuth2 Bearer token
Responses
200

Content-Type application/vnd.kii.ThingStatusRetrievalResponse+json

The status of the thing.
Contents
Name Type Description
disabled boolean True if thing is disabled, false if it's enabled.
404

Content-Type application/vnd.kii.ThingNotFoundException+json

The thing was not found.
Contents
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.
401

Content-Type application/vnd.kii.UnauthorizedAccessException+json

Not authorized to change the status of the thing.
Contents
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).

PUT

/api/apps/{appID}/things/VENDOR_THING_ID:{vendorThingID}/status

Description

Change the status of the thing.

Security

The administrator and a thing owner can perform this operation.

Content-Type application/vnd.kii.ThingStatusUpdateRequest+json

The data for changing the status of the thing.

Headers
Name Required? type Description
Authorization Yes string Authorization header. OAuth2 Bearer token
Params
Name Required? Type Description
disabled boolean True to disable the thing, false to enable
Sample Request
{
  "disabled": "[boolean]"
}
Responses
204

Content-Type (None)

The status of the thing has been changed.
Note This response has no contents.
404

Content-Type application/vnd.kii.ThingNotFoundException+json

The thing was not found.
Contents
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.
400

Content-Type application/vnd.kii.ValidationException+json

The value of the "disabled" field was invalid.
Contents
Name Type Description
errorCode string Error code "INVALID_INPUT_DATA".
message string The error message.
401

Content-Type application/vnd.kii.UnauthorizedAccessException+json

Not authorized to change the status of the thing.
Contents
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).