Interface GroupResource
public interface GroupResource
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Method Summary
Modifier and TypeMethodDescriptionReturns indicator if the fine grain permissions are enabled or not.getSubGroups
(Integer first, Integer max, Boolean briefRepresentation) Get the paginated list of subgroups belonging to this group.Get the paginated list of subgroups belonging to this group, filtered according to the specified parameters.members()
Get usersGet usersGet usersvoid
remove()
roles()
Enables or disables the fine grain permissions feature.jakarta.ws.rs.core.Response
Set or create child.Does not expand hierarchy.void
Update group
-
Method Details
-
setPermissions
@PUT @Path("/management/permissions") @Consumes("application/json") @Produces("application/json") ManagementPermissionReference setPermissions(ManagementPermissionRepresentation status) Enables or disables the fine grain permissions feature. Returns the updated status of the server in theManagementPermissionReference
.- Parameters:
status
- status request to apply- Returns:
- permission reference indicating the updated status
-
getPermissions
@GET @Path("/management/permissions") @Produces("application/json") ManagementPermissionReference getPermissions()Returns indicator if the fine grain permissions are enabled or not.- Returns:
- current representation of the permissions feature
-
toRepresentation
Does not expand hierarchy. Subgroups will not be set.- Returns:
-
update
Update group- Parameters:
rep
-
-
remove
@DELETE void remove() -
getSubGroups
@GET @Path("children") @Produces("application/json") @Consumes("application/json") List<GroupRepresentation> getSubGroups(@QueryParam("first") Integer first, @QueryParam("max") Integer max, @QueryParam("briefRepresentation") Boolean briefRepresentation) Get the paginated list of subgroups belonging to this group.- Parameters:
first
- the position of the first result to be returned.max
- the maximum number of results that are to be returned.briefRepresentation
- iftrue
, each returned subgroup representation will only contain basic information (id, name, path, and parentId). Iffalse
, the complete representations of the subgroups are returned (include role mappings and attributes).
-
getSubGroups
@GET @Path("children") @Produces("application/json") @Consumes("application/json") List<GroupRepresentation> getSubGroups(@QueryParam("search") String search, @QueryParam("exact") Boolean exact, @QueryParam("first") Integer first, @QueryParam("max") Integer max, @QueryParam("briefRepresentation") Boolean briefRepresentation) Get the paginated list of subgroups belonging to this group, filtered according to the specified parameters.- Parameters:
search
- aString
representing either an exact group name or a partial name. If empty ornull
then all subgroups of this group are returned. Parameter available since Keycloak server 25. Will be ignored on older Keycloak versions with the default value null.exact
- iftrue
, the subgroups will be searched using exact match for thesearch
param. If false ornull
, the method returns all subgroups that partially match the specified name. Parameter available since Keycloak server 25. Will be ignored on older Keycloak versions with the default value null.first
- the position of the first result to be returned.max
- the maximum number of results that are to be returned.briefRepresentation
- iftrue
, each returned subgroup representation will only contain basic information (id, name, path, and parentId). Iffalse
, the complete representations of the subgroups are returned (including role mappings and attributes).
-
subGroup
@POST @Path("children") @Produces("application/json") @Consumes("application/json") jakarta.ws.rs.core.Response subGroup(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
-
-
roles
-
members
Get users Returns a list of all users in group.- Returns:
- Returns a max size of 100 users
-
members
@GET @Path("/members") @Produces("application/json") List<UserRepresentation> members(@QueryParam("first") Integer firstResult, @QueryParam("max") Integer maxResults) Get users Returns a list of users, filtered according to query parameters- Parameters:
firstResult
- Pagination offsetmaxResults
- Pagination size- Returns:
-
members
@GET @Path("/members") @Produces("application/json") List<UserRepresentation> members(@QueryParam("first") Integer firstResult, @QueryParam("max") Integer maxResults, @QueryParam("briefRepresentation") Boolean briefRepresentation) Get users Returns a list of users, filtered according to query parameters- Parameters:
firstResult
- Pagination offsetmaxResults
- Pagination sizebriefRepresentation
- 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:
-