Class OrganizationsResource

java.lang.Object
org.keycloak.organization.admin.resource.OrganizationsResource

@Provider public class OrganizationsResource extends Object
  • Constructor Details

  • Method Details

    • create

      @POST @Consumes("application/json") public jakarta.ws.rs.core.Response create(OrganizationRepresentation organization)
      Creates a new organization based on the specified OrganizationRepresentation.
      Parameters:
      organization - the representation containing the organization data.
      Returns:
      a Response containing the status of the operation.
    • search

      @GET @Produces("application/json") public Stream<OrganizationRepresentation> search(@QueryParam("search") String search, @QueryParam("q") String searchQuery, @QueryParam("exact") Boolean exact, @QueryParam("first") @DefaultValue("0") Integer first, @QueryParam("max") @DefaultValue("10") Integer max)
      Returns a stream of organizations, filtered according to query parameters.
      Parameters:
      search - a String representing either an organization name or domain.
      searchQuery - a query to search for organization attributes, in the format 'key1:value2 key2:value2'.
      exact - if true, the organizations will be searched using exact match for the search param - i.e. either the organization name or one of its domains must match exactly the search param. If false, the method returns all organizations whose name or (domains) partially match the search param.
      first - the position of the first result to be processed (pagination offset). Ignored if negative or null.
      max - the maximum number of results to be returned. Ignored if negative or null.
      Returns:
      a non-null Stream of matched organizations.
    • get

      @Path("{id}") public OrganizationResource get(@PathParam("id") String id)
      Base path for the admin REST API for one particular organization.
    • getOrganizations

      @Path("members/{id}/organizations") @GET @Produces("application/json") public Stream<OrganizationRepresentation> getOrganizations(@PathParam("id") String id)