Request Headers (Applies to all methods)
PUT
/api/apps/{appID}/groups/{groupID}
Create a new group with a given groupID.
The maximum size of the groupID is 30 characters and must follow the pattern [a-z0-9_\-\.]*. The 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.ValidationException+json
| Name | Type | Description |
|---|---|---|
| errorCode | string | Error code "INVALID_INPUT_DATA". |
| message | string | The error message. |
Content-Type application/vnd.kii.GroupAlreadyExistsException+json
| Name | Type | Description |
|---|---|---|
| errorCode | string | Error code "GROUP_ALREADY_EXISTS". |
| message | string | The error message. |
| groupID | string | The ID of the group. |
| appID | string | The ID of the application. |
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). |
GET
/api/apps/{appID}/groups/{groupID}
Get the data of the group.
An anonymous access is not allowed for this method.
Content-Type application/vnd.kii.GroupRetrievalResponse+json
| Name | Type | Description |
|---|---|---|
| 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.GroupNotFoundException+json
| 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. |
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). |
DELETE
/api/apps/{appID}/groups/{groupID}
Delete the group.
Only the administrator and the group owner can perform this operation.
Content-Type (None)
Content-Type application/vnd.kii.GroupNotFoundException+json
| 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. |
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). |