Request Headers (Applies to all methods)
GET
/api/apps/{appID}/groups
Get a list of groups.
You can filter the list by the membership or by ownership.
- By setting the "is_member" parameter, you can retrieve a list of groups in which the specified user is a member.
 - By setting the "owner" parameter, you can retrieve a list of groups in which the specified user is an owner.
 
An anonymous access is not allowed for this method.
Content-Type application/json
Content-Type application/vnd.kii.GroupsRetrievalResponse+json
| Name | Type | Description | 
|---|---|---|
| groups | GroupRetrievalResponse | |
| groupID | string | The ID of the group. | 
| name | string | The name of the group. | 
| owner | string | The userID of the group owner. | 
Content-Type application/vnd.kii.UserNotFoundException+json
| 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. | 
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). | 
POST
/api/apps/{appID}/groups
Create a new group.
The group owner will be added as a group member by default.
An anonymous and thing access is not allowed for this method. If accessing as the administrator, an owner is not required.
Content-Type application/vnd.kii.GroupCreationRequest+json
All the required data for creating the group.
{
  "name": "[string]",
  "owner": "[string]",
  "members": "[string]"
}Content-Type application/vnd.kii.GroupCreationResponse+json
| Name | Type | Description | 
|---|---|---|
| Location | string | URI of the created group. | 
| Name | Type | Description | 
|---|---|---|
| groupID | string | The ID of the created group. | 
| notFoundUsers | string | The collection of userIDs of the users who were not found and thus not added as the group members. | 
Content-Type application/vnd.kii.UserNotFoundException+json
| 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. | 
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). |