Interface GroupsResource
public interface GroupsResource
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.Responseadd(org.keycloak.representations.idm.GroupRepresentation rep) create or add a top level realm groupSet or create child.count()Counts all groups.count(boolean onlyTopGroups) Counts groups by name search.Counts groups by name search.List<org.keycloak.representations.idm.GroupRepresentation>groups()Get all groups.List<org.keycloak.representations.idm.GroupRepresentation>Get groups by pagination params.List<org.keycloak.representations.idm.GroupRepresentation>Get groups by pagination params.List<org.keycloak.representations.idm.GroupRepresentation>groups(String search, Boolean exact, Integer first, Integer max, boolean briefRepresentation, Boolean subGroupsCount) Get groups by pagination params.List<org.keycloak.representations.idm.GroupRepresentation>Get groups by pagination params.List<org.keycloak.representations.idm.GroupRepresentation>Get groups by pagination params.List<org.keycloak.representations.idm.GroupRepresentation>List<org.keycloak.representations.idm.GroupRepresentation>List<org.keycloak.representations.idm.GroupRepresentation>query(String searchQuery, boolean populateHierarchy, Integer first, Integer max, boolean briefRepresentation)
-
Method Details
-
groups
@GET @Produces("application/json") List<org.keycloak.representations.idm.GroupRepresentation> groups()Get all groups.- Returns:
- A list containing all groups.
-
groups
@GET @Produces("application/json") @Consumes("application/json") List<org.keycloak.representations.idm.GroupRepresentation> groups(@QueryParam("first") Integer first, @QueryParam("max") Integer max) Get groups by pagination params.- Parameters:
first- index of the first element (pagination offset).max- the maximum number of results.- Returns:
- A list containing the slice of all groups.
-
groups
@GET @Produces("application/json") @Consumes("application/json") List<org.keycloak.representations.idm.GroupRepresentation> groups(@QueryParam("search") String search, @QueryParam("first") Integer first, @QueryParam("max") Integer max) Get groups by pagination params.- Parameters:
search- AStringrepresenting either an exact or partial group name.first- index of the first element (pagination offset).max- the maximum number of results.- Returns:
- A list containing the slice of all groups.
-
groups
@GET @Produces("application/json") @Consumes("application/json") List<org.keycloak.representations.idm.GroupRepresentation> groups(@QueryParam("search") String search, @QueryParam("first") Integer first, @QueryParam("max") Integer max, @QueryParam("briefRepresentation") @DefaultValue("true") boolean briefRepresentation) Get groups by pagination params.- Parameters:
search- AStringrepresenting either an exact or partial group name.first- index of the first element (pagination offset).max- the maximum number of results.briefRepresentation- iftrue, each returned group representation will only contain basic information (id, name, path, and parentId). Iffalse, the complete representations of the groups are returned (including role mappings and attributes).- Returns:
- A list containing the slice of all groups.
-
groups
@GET @Produces("application/json") @Consumes("application/json") List<org.keycloak.representations.idm.GroupRepresentation> groups(@QueryParam("search") String search, @QueryParam("exact") Boolean exact, @QueryParam("first") Integer first, @QueryParam("max") Integer max, @QueryParam("briefRepresentation") @DefaultValue("true") boolean briefRepresentation, @QueryParam("subGroupsCount") @DefaultValue("true") Boolean subGroupsCount) Get groups by pagination params.- Parameters:
search- AStringrepresenting either an exact or partial group name.exact- iftrue, the groups will be searched using exact match for thesearchparam. If false, * the method returns all groups that partially match the specified name.first- index of the first element (pagination offset).max- the maximum number of results.briefRepresentation- iftrue, each returned group representation will only contain basic information (id, name, path, and parentId). Iffalse, the complete representations of the groups are returned (including role mappings and attributes).subGroupsCount- iftrue, the count of subgroups is returned for each subgroup. Defaults to true. Parameter supported since Keycloak 26.3. For older versions, it is always true.- Returns:
- A list containing the slice of all groups.
-
groups
@GET @Produces("application/json") @Consumes("application/json") List<org.keycloak.representations.idm.GroupRepresentation> groups(@QueryParam("search") String search, @QueryParam("exact") Boolean exact, @QueryParam("first") Integer first, @QueryParam("max") Integer max, @QueryParam("briefRepresentation") @DefaultValue("true") boolean briefRepresentation) Get groups by pagination params.- Parameters:
search- AStringrepresenting either an exact or partial group name.exact- iftrue, the groups will be searched using exact match for thesearchparam. If false, * the method returns all groups that partially match the specified name.first- index of the first element (pagination offset).max- the maximum number of results.briefRepresentation- iftrue, each returned group representation will only contain basic information (id, name, path, and parentId). Iffalse, the complete representations of the groups are returned (including role mappings and attributes).- Returns:
- A list containing the slice of all groups.
-
count
@GET @Path("count") @Produces("application/json") @Consumes("application/json") Map<String,Long> count()Counts all groups.- Returns:
- A map containing key "count" with number of groups as value.
-
count
@GET @Path("count") @Produces("application/json") @Consumes("application/json") Map<String,Long> count(@QueryParam("search") String search) Counts groups by name search.- Parameters:
search- max number of occurrences- Returns:
- A map containing key "count" with number of groups as value which matching with search.
-
count
@GET @Path("count") @Produces("application/json") @Consumes("application/json") Map<String,Long> count(@QueryParam("top") @DefaultValue("true") boolean onlyTopGroups) Counts groups by name search.- Parameters:
onlyTopGroups-trueorfalsefor filter only top level groups count- Returns:
- A map containing key "count" with number of top level groups.
-
add
@POST @Consumes("application/json") jakarta.ws.rs.core.Response add(org.keycloak.representations.idm.GroupRepresentation rep) create or add a top level realm groupSet or create child. This will update the group and set the parent if it exists. Create it and set the parent if the group doesn't exist.- Parameters:
rep-
-
group
-
query
-
query
-
query
@GET @Produces("application/json") List<org.keycloak.representations.idm.GroupRepresentation> query(@QueryParam("q") String searchQuery, @QueryParam("populateHierarchy") boolean populateHierarchy, @QueryParam("first") Integer first, @QueryParam("max") Integer max, @QueryParam("briefRepresentation") boolean briefRepresentation)
-