org.keycloak.admin.client.resource

## Interface GroupsResource

-     public interface GroupsResource

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.ws.rs.core.Response` | `add(GroupRepresentation rep)` create or add a top level realm groupSet or create child.
    `Map<String,Long>` | `count()` Counts all groups.
    `Map<String,Long>` | `count(boolean onlyTopGroups)` Counts groups by name search.
    `Map<String,Long>` | `count(String search)` Counts groups by name search.
    `GroupResource` | `group(String id)`
    `List<GroupRepresentation>` | `groups()` Get all groups.
    `List<GroupRepresentation>` | `groups(Integer first, Integer max)` Get groups by pagination params.
    `List<GroupRepresentation>` | `groups(String search, Integer first, Integer max)` Get groups by pagination params.
    `List<GroupRepresentation>` | `groups(String search, Integer first, Integer max, boolean briefRepresentation)` Get groups by pagination params.

- - ### Method Detail

    - #### groups

          @GET
           @Produces(value="application/json")
          List<GroupRepresentation> groups()

      Get all groups.
      Returns:
        A list containing all groups.

    - #### groups

          @GET
           @Produces(value="application/json")
           @Consumes(value="application/json")
          List<GroupRepresentation> groups(@QueryParam(value="first")
                                                                                                                          Integer first,
                                                                                                                          @QueryParam(value="max")
                                                                                                                          Integer max)

      Get groups by pagination params.
      Parameters:
        `first` - index of the first element
        `max` - max number of occurrences
      Returns:
        A list containing the slice of all groups.

    - #### groups

          @GET
           @Produces(value="application/json")
           @Consumes(value="application/json")
          List<GroupRepresentation> groups(@QueryParam(value="search")
                                                                                                                          String search,
                                                                                                                          @QueryParam(value="first")
                                                                                                                          Integer first,
                                                                                                                          @QueryParam(value="max")
                                                                                                                          Integer max)

      Get groups by pagination params.
      Parameters:
        `search` - max number of occurrences
        `first` - index of the first element
        `max` - max number of occurrences
      Returns:
        A list containing the slice of all groups.

    - #### groups

          @GET
           @Produces(value="application/json")
           @Consumes(value="application/json")
          List<GroupRepresentation> groups(@QueryParam(value="search")
                                                                                                                          String search,
                                                                                                                          @QueryParam(value="first")
                                                                                                                          Integer first,
                                                                                                                          @QueryParam(value="max")
                                                                                                                          Integer max,
                                                                                                                          @QueryParam(value="briefRepresentation") @DefaultValue(value="true")
                                                                                                                          boolean briefRepresentation)

      Get groups by pagination params.
      Parameters:
        `search` - max number of occurrences
        `first` - index of the first element
        `max` - max number of occurrences
        `briefRepresentation` - if false, return groups with their attributes
      Returns:
        A list containing the slice of all groups.

    - #### count

          @GET
           @Path(value="count")
           @Produces(value="application/json")
           @Consumes(value="application/json")
          Map<String,Long> count()

      Counts all groups.
      Returns:
        A map containing key "count" with number of groups as value.

    - #### count

          @GET
           @Path(value="count")
           @Produces(value="application/json")
           @Consumes(value="application/json")
          Map<String,Long> count(@QueryParam(value="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(value="count")
           @Produces(value="application/json")
           @Consumes(value="application/json")
          Map<String,Long> count(@QueryParam(value="top") @DefaultValue(value="true")
                                                                                                                                      boolean onlyTopGroups)

      Counts groups by name search.
      Parameters:
        `onlyTopGroups` - `true` or `false` for filter only top level groups count
      Returns:
        A map containing key "count" with number of top level groups.

    - #### add

          @POST
           @Consumes(value="application/json")
          javax.ws.rs.core.Response add(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

          @Path(value="{id}")
          GroupResource group(@PathParam(value="id")
                                                  String id)

Copyright © 2020 JBoss by Red Hat. All rights reserved.