Class OrganizationsResource
java.lang.Object
org.keycloak.organization.admin.resource.OrganizationsResource
-
Constructor Summary
ConstructorDescriptionOrganizationsResource
(KeycloakSession session, AdminPermissionEvaluator auth, AdminEventBuilder adminEvent) -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.Response
create
(OrganizationRepresentation organization) Creates a new organization based on the specifiedOrganizationRepresentation
.Base path for the admin REST API for one particular organization.search
(String search, String searchQuery, Boolean exact, Integer first, Integer max, boolean briefRepresentation) Returns a stream of organizations, filtered according to query parameters.
-
Constructor Details
-
OrganizationsResource
public OrganizationsResource(KeycloakSession session, AdminPermissionEvaluator auth, AdminEventBuilder adminEvent)
-
-
Method Details
-
create
@POST @Consumes("application/json") public jakarta.ws.rs.core.Response create(OrganizationRepresentation organization) Creates a new organization based on the specifiedOrganizationRepresentation
.- 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, @QueryParam("briefRepresentation") @DefaultValue("false") boolean briefRepresentation) Returns a stream of organizations, filtered according to query parameters.- Parameters:
search
- aString
representing either an organization name or domain.searchQuery
- a query to search for organization attributes, in the format 'key1:value2 key2:value2'.exact
- iftrue
, the organizations will be searched using exact match for thesearch
param - i.e. either the organization name or one of its domains must match exactly thesearch
param. If false, the method returns all organizations whose name or (domains) partially match thesearch
param.first
- the position of the first result to be processed (pagination offset). Ignored if negative ornull
.max
- the maximum number of results to be returned. Ignored if negative ornull
.- Returns:
- a non-null
Stream
of matched organizations.
-
get
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)
-