Status

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

Request Headers (Applies to all methods)

Authorization
header
Required: Yes

GET

/api/apps/{appID}/users/{accountType}:{address}/status

Description

Get the current status of the user.

Security

Can be performed only by administrator

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

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

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

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

The user was not found.
Contents
Name Type Description
errorCode string Error code "USER_NOT_FOUND".
message string The error message.
field string The field used for searching the user. This can be the userID or address field.
value string The field value used for searching the user.
appID string The ID of the application.
401

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

Not authorized to change the status of the user.
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}/users/{accountType}:{address}/status

Description

Change the status of the user.

Security

Can be performed only by administrator

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

The data to change the status of the user.

Headers
Name Required? type Description
Authorization Yes string Authorization header. OAuth2 Bearer token
Params
Name Required? Type Description
disabled boolean True for disabling the user. False for enabling the user.
Sample Request
{
  "disabled": "[boolean]"
}
Responses
204

Content-Type (None)

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

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

The user was not found.
Contents
Name Type Description
errorCode string Error code "USER_NOT_FOUND".
message string The error message.
field string The field used for searching the user. This can be the userID or address field.
value string The field value used for searching the user.
appID string The ID of the application.
401

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

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