Location
/api/apps/{appID}/groups/{groupID}/owner
This resource represents the owner of the group.
Request Headers (Applies to all methods)
Authorization
header
Required: Yes
PUT
/api/apps/{appID}/groups/{groupID}/owner
Description
Change the group owner.
Security
Only the administrator and the group owner can perform this operation.
Content-Type application/vnd.kii.GroupOwnerChangeRequest+json
The new owner of the group.
Name
Required?
type
Description
Authorization
Yes
string
Authorization header. OAuth2 Bearer token
Name
Required?
Type
Description
owner
string
The userID of the new group owner.
Sample Request
{
"owner": "[string]"
}
Responses
200
Content-Type (None)
The owner of the group has been changed successfully.
404
Content-Type application/vnd.kii.UserNotFoundException+json
The new owner 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 change the owner of 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). |