User Member

Location /api/apps/{appID}/groups/{groupID}/members/{userID}
This resource represents a member in the group.

Request Headers (Applies to all methods)

Authorization
header
Required: Yes

PUT

/api/apps/{appID}/groups/{groupID}/members/{userID}

Description

Add a new group member.

Security

Can be performed by the administrator and the group owner.

Note

This request requires empty body.

Headers
Name Required? type Description
Authorization Yes string Authorization header. OAuth2 Bearer token
URL Params
Name Required? type Description
userID Yes string The ID of the user.
Responses
204

Content-Type (None)

The user has been added successfully to the group.
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.
404

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

The group was not found.
Contents
Name Type Description
errorCode string Error code "GROUP_NOT_FOUND".
message string The error message.
groupID string The groupID of the group.
appID string The ID of the application.
401

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

Not authorized to add a member to the group.
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).

DELETE

/api/apps/{appID}/groups/{groupID}/members/{userID}

Description

Remove a group member.

Security

Can be performed by the administrator, the group owner, and the target member himself.

Headers
Name Required? type Description
Authorization Yes string Authorization header. OAuth2 Bearer token
URL Params
Name Required? type Description
userID Yes string The ID of the user.
Responses
204

Content-Type (None)

The user has been removed successfully from the group.
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.
404

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

The group was not found.
Contents
Name Type Description
errorCode string Error code "GROUP_NOT_FOUND".
message string The error message.
groupID string The groupID of the group.
appID string The ID of the application.
401

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

Not authorized to remove the member.
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).