Interface OrganizationsResource
public interface OrganizationsResource
- Since:
- Keycloak 25. All the child endpoints are also available since that version
This endpoint including all the child endpoints requires feature
Profile.Feature.ORGANIZATION
to be enabled
-
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.Response
create
(OrganizationRepresentation organization) getAll()
Returns all organizations in the realm.members()
Returns all organizations that match the specified filter.Returns all organizations that match the specified filters.searchByAttribute
(String searchQuery) Returns all organizations that contain attributes matching the specified query.searchByAttribute
(String searchQuery, Integer first, Integer max) Returns all organizations that contain attributes matching the specified query.
-
Method Details
-
create
@POST @Consumes("application/json") jakarta.ws.rs.core.Response create(OrganizationRepresentation organization) -
get
-
getAll
Returns all organizations in the realm.- Returns:
- a list containing the organizations.
-
search
@GET @Produces("application/json") List<OrganizationRepresentation> search(@QueryParam("search") String search) Returns all organizations that match the specified filter.- Parameters:
search
- aString
representing either an organization name or domain.- Returns:
- a list containing the matched organizations.
-
search
@GET @Produces("application/json") List<OrganizationRepresentation> search(@QueryParam("search") String search, @QueryParam("exact") Boolean exact, @QueryParam("first") Integer first, @QueryParam("max") Integer max) Returns all organizations that match the specified filters.- Parameters:
search
- aString
representing either an organization name or domain.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 list containing the matched organizations.
-
searchByAttribute
@GET @Produces("application/json") List<OrganizationRepresentation> searchByAttribute(@QueryParam("q") String searchQuery) Returns all organizations that contain attributes matching the specified query.- Parameters:
searchQuery
- a query to search for organization attributes, in the format 'key1:value2 key2:value2'.- Returns:
- a list containing the organizations that match the attribute query.
-
searchByAttribute
@GET @Produces("application/json") List<OrganizationRepresentation> searchByAttribute(@QueryParam("q") String searchQuery, @QueryParam("first") Integer first, @QueryParam("max") Integer max) Returns all organizations that contain attributes matching the specified query.- Parameters:
searchQuery
- a query to search for organization attributes, in the format 'key1:value2 key2:value2'.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 list containing the organizations that match the attribute query.
-
members
-