Use the following APIs to create, fetch, update, and delete user groups.
Create a Group
Get a Group by ID
Get a List of Groups
- Required Permissions
-
You must have the View Group permission to perform this operation.
- API
- /api/groups
- Method
- GET
- Optional Parameters
-
Name Description name string
Enter a minimum of 3 letters of the group name that you are searching for. Group names that contain these 3 letters in any order are displayed. queryType SHOW_CURRENT, SHOW_ANCESTORS,SHOW_DESCENDANTS or SHOW_ALL - Response
-
{ "groups": [ { "id": "", "name": "", "description":"", "isDefault": false, "createdTime": "", "lastUpdatedTime": "", "createdBy":"", "lastUpdatedBy":"", "updateVersion":1 } ], "pageInfo": { "page": 1, "pageSize": 10, "totalElements": "4", "totalPages": "1" } }
Update a Group
- Required Permissions
-
You must have the Edit Group permission to perform this operation.
- API
- /api/groups/{id}
- Method
- PUT
- Required Parameters
-
Name Description name string
Name of the role. description string
Description of the role. roles string
The roles assigned to the group. updateVersion integer
The update version of the role. - Input Example
-
{ "name": "", "description":"", "roles":[//Array of role ids], "updateVersion":1 }
- Response
-
{ "id": "string" }
Delete a Group
List Users for Group
- Required Permissions
-
You must have the View Group permission to perform this operation.
- API
- /api/console-groups/{id}/users?page.number=1&page.size=10
- Method
- GET
- Required Parameters
-
Parameter Description queryType SHOW_CURRENT, SHOW_ANCESTORS,SHOW_DESCENDANTS or SHOW_ALL - Response
-
{ "users": [ { "id": "", "userName": "", "displayName": "", "status": "", "orgId": "", "createdTime": "", "lastUpdatedTime": "", "updateVersion": 5, "createdBy": "s", "lastUpdatedBy": "" } ], "pageInfo": { "page": 1, "pageSize": 10, "totalElements": "1", "totalPages": "1" } }