Class ClientsAPI


  • @Path("clients")
    public class ClientsAPI
    extends Object
    • Constructor Detail

      • ClientsAPI

        public ClientsAPI()
    • Method Detail

      • clientMembers

        @GET
        @Path("members")
        @Produces({"application/json;charset=UTF-8","application/vnd.api+json"})
        public jakarta.ws.rs.core.Response clientMembers​(@QueryParam("first") @DefaultValue("0")
                                                         int firstResult,
                                                         @QueryParam("max") @DefaultValue("100")
                                                         int maxResults,
                                                         @QueryParam("format_users") @DefaultValue("username")
                                                         KCUserController.REPR format_users,
                                                         @QueryParam("role") @DefaultValue("Member")
                                                         String role_name,
                                                         @QueryParam("client_id")
                                                         String clientId)
        returns the list of members of the client with the given role default client is the current client, optional clientId to show a different one default showed role is "Member" output format can be customized using format_users
        Parameters:
        client_id - optional clientId (aka encoded context). if absent, uses current context
        format_users - response format for users. use "none" for skip
        role - role to inspect, default Member.
        firstResult - pagination offset
        maxResults - maximum results size
      • clientUsers

        @GET
        @Path("users")
        @Produces({"application/json;charset=UTF-8","application/vnd.api+json"})
        public jakarta.ws.rs.core.Response clientUsers​(@QueryParam("first") @DefaultValue("0")
                                                       int firstResult,
                                                       @QueryParam("max") @DefaultValue("100")
                                                       int maxResults,
                                                       @QueryParam("format_users") @DefaultValue("username")
                                                       KCUserController.REPR format_users,
                                                       @QueryParam("client_id")
                                                       String clientId)
        returns the list of users of the client users list is a subset of members list, it's obtained from the group named as the context default client is the current client, optional clientId to show a different one output format can be customized using format_users
        Parameters:
        client_id - optional clientId (aka encoded context). if absent, uses current context
        format_users - response format for users. use "none" for skip
        role - list of roles to inspect, default Member. can use multiple times. use '__all__' to get all roles in the client
        firstResult - pagination offset
        maxResults - maximum results size
      • client

        @GET
        @Path("info")
        @Produces({"application/json;charset=UTF-8","application/vnd.api+json"})
        public jakarta.ws.rs.core.Response client​(@QueryParam("format_client") @DefaultValue("compact")
                                                  KCClientsController.REPR format_client,
                                                  @QueryParam("format_users") @DefaultValue("username")
                                                  KCUserController.REPR format_users,
                                                  @QueryParam("format_roles") @DefaultValue("compact")
                                                  KCRolesController.REPR format_roles,
                                                  @QueryParam("format_groups") @DefaultValue("name")
                                                  KCGroupsController.REPR format_group,
                                                  @QueryParam("role") @DefaultValue("Member")
                                                  List<String> roles,
                                                  @QueryParam("client_id")
                                                  String clientId)
      • createClientFromTemplate

        @POST
        @Path("fromTemplate/{name}")
        @Produces({"application/json;charset=UTF-8","application/vnd.api+json"})
        public jakarta.ws.rs.core.Response createClientFromTemplate​(@PathParam("name")
                                                                    String template_name,
                                                                    ClientsAPI.ClientFromTemplateParams params)
      • createClientFromTemplate

        @POST
        @Produces({"application/json;charset=UTF-8","application/vnd.api+json"})
        public jakarta.ws.rs.core.Response createClientFromTemplate​(org.keycloak.representations.idm.ClientRepresentation client)
      • createClient

        @POST
        @Path("/")
        @Produces({"application/json;charset=UTF-8","application/vnd.api+json"})
        public jakarta.ws.rs.core.Response createClient​(org.keycloak.representations.idm.ClientRepresentation client)