Class GroupResource
- java.lang.Object
- 
- org.keycloak.services.resources.admin.GroupResource
 
- 
 public class GroupResource extends Object - Author:
- Bill Burke
 
- 
- 
Constructor SummaryConstructors Constructor Description GroupResource(RealmModel realm, GroupModel group, KeycloakSession session, AdminPermissionEvaluator auth, AdminEventBuilder adminEvent)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.ResponseaddChild(GroupRepresentation rep)Set or create child.voiddeleteGroup()GroupRepresentationgetGroup()ManagementPermissionReferencegetManagementPermissions()Return object stating whether client Authorization permissions have been initialized or not and a referenceStream<UserRepresentation>getMembers(Integer firstResult, Integer maxResults, Boolean briefRepresentation)Get users Returns a stream of users, filtered according to query parametersRoleMapperResourcegetRoleMappings()ManagementPermissionReferencesetManagementPermissionsEnabled(ManagementPermissionReference ref)Return object stating whether client Authorization permissions have been initialized or not and a referencestatic ManagementPermissionReferencetoMgmtRef(GroupModel group, AdminPermissionManagement permissions)javax.ws.rs.core.ResponseupdateGroup(GroupRepresentation rep)Update group, ignores subgroups.static voidupdateGroup(GroupRepresentation rep, GroupModel model, RealmModel realm, KeycloakSession session)
 
- 
- 
- 
Constructor Detail- 
GroupResourcepublic GroupResource(RealmModel realm, GroupModel group, KeycloakSession session, AdminPermissionEvaluator auth, AdminEventBuilder adminEvent) 
 
- 
 - 
Method Detail- 
getGroup@GET @Produces("application/json") public GroupRepresentation getGroup()- Returns:
 
 - 
updateGroup@PUT @Consumes("application/json") public javax.ws.rs.core.Response updateGroup(GroupRepresentation rep)Update group, ignores subgroups.- Parameters:
- rep-
 
 - 
deleteGroup@DELETE public void deleteGroup() 
 - 
addChild@POST @Path("children") @Produces("application/json") @Consumes("application/json") public javax.ws.rs.core.Response addChild(GroupRepresentation rep)Set or create child. This will just set the parent if it exists. Create it and set the parent if the group doesn't exist.- Parameters:
- rep-
 
 - 
updateGrouppublic static void updateGroup(GroupRepresentation rep, GroupModel model, RealmModel realm, KeycloakSession session) 
 - 
getRoleMappings@Path("role-mappings") public RoleMapperResource getRoleMappings()
 - 
getMembers@GET @Path("members") @Produces("application/json") public Stream<UserRepresentation> getMembers(@QueryParam("first") Integer firstResult, @QueryParam("max") Integer maxResults, @QueryParam("briefRepresentation") Boolean briefRepresentation)Get users Returns a stream of users, filtered according to query parameters- Parameters:
- firstResult- Pagination offset
- maxResults- Maximum results size (defaults to 100)
- briefRepresentation- Only return basic information (only guaranteed to return id, username, created, first and last name, email, enabled state, email verification state, federation link, and access. Note that it means that namely user attributes, required actions, and not before are not returned.)
- Returns:
- a non-null Streamof users
 
 - 
getManagementPermissions@Path("management/permissions") @GET @Produces("application/json") public ManagementPermissionReference getManagementPermissions()Return object stating whether client Authorization permissions have been initialized or not and a reference- Returns:
 
 - 
toMgmtRefpublic static ManagementPermissionReference toMgmtRef(GroupModel group, AdminPermissionManagement permissions) 
 - 
setManagementPermissionsEnabled@Path("management/permissions") @PUT @Produces("application/json") @Consumes("application/json") public ManagementPermissionReference setManagementPermissionsEnabled(ManagementPermissionReference ref)Return object stating whether client Authorization permissions have been initialized or not and a reference- Returns:
- initialized manage permissions reference
 
 
- 
 
-