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.ORGANIZATIONto be enabled
-
Method Summary
Modifier and TypeMethodDescriptionlongCounts organizations by search.longCounts organizations by search.longcountByAttribute(String searchQuery) Counts all organizations that contain attributes matching the specified query.jakarta.ws.rs.core.Responsecreate(org.keycloak.representations.idm.OrganizationRepresentation organization) List<org.keycloak.representations.idm.OrganizationRepresentation>getAll()Deprecated.List<org.keycloak.representations.idm.OrganizationRepresentation>Returns organizations in the realm.members()List<org.keycloak.representations.idm.OrganizationRepresentation>Returns all organizations that match the specified filter.List<org.keycloak.representations.idm.OrganizationRepresentation>Returns all organizations that match the specified filters.List<org.keycloak.representations.idm.OrganizationRepresentation>Returns all organizations that match the specified filters.List<org.keycloak.representations.idm.OrganizationRepresentation>searchByAttribute(String searchQuery) Returns all organizations that contain attributes matching the specified query.List<org.keycloak.representations.idm.OrganizationRepresentation>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(org.keycloak.representations.idm.OrganizationRepresentation organization) -
get
-
getAll
@Deprecated @GET @Produces("application/json") List<org.keycloak.representations.idm.OrganizationRepresentation> getAll()Deprecated.Returns all organizations in the realm.- Returns:
- a list containing the organizations.
-
list
@GET @Produces("application/json") List<org.keycloak.representations.idm.OrganizationRepresentation> list(@QueryParam("first") Integer firstResult, @QueryParam("max") Integer maxResults) Returns organizations in the realm.- Parameters:
first- index of the first element (pagination offset).max- the maximum number of results.- Returns:
- a list containing the organizations.
-
search
@GET @Produces("application/json") List<org.keycloak.representations.idm.OrganizationRepresentation> search(@QueryParam("search") String search) Returns all organizations that match the specified filter.- Parameters:
search- aStringrepresenting either an organization name or domain.- Returns:
- a list containing the matched organizations.
-
search
@GET @Produces("application/json") List<org.keycloak.representations.idm.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- aStringrepresenting either an organization name or domain.exact- iftrue, the organizations will be searched using exact match for thesearchparam - i.e. either the organization name or one of its domains must match exactly thesearchparam. If false, the method returns all organizations whose name or (domains) partially match thesearchparam.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.
-
search
@GET @Produces("application/json") List<org.keycloak.representations.idm.OrganizationRepresentation> search(@QueryParam("search") String search, @QueryParam("exact") Boolean exact, @QueryParam("first") Integer first, @QueryParam("max") Integer max, @QueryParam("briefRepresentation") Boolean briefRepresentation) Returns all organizations that match the specified filters.- Parameters:
search- aStringrepresenting either an organization name or domain.exact- iftrue, the organizations will be searched using exact match for thesearchparam - i.e. either the organization name or one of its domains must match exactly thesearchparam. If false, the method returns all organizations whose name or (domains) partially match thesearchparam.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.briefRepresentation- iffalsethe full representation is to be returned. Otherwise, only the basic fields are returned. The parameter is supported since Keycloak 26.1- Returns:
- a list containing the matched organizations.
- Since:
- Keycloak 26.1. Use method
search(String, Boolean, Integer, Integer)for the older versions of the Keycloak server
-
searchByAttribute
@GET @Produces("application/json") List<org.keycloak.representations.idm.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<org.keycloak.representations.idm.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.
-
count
@GET @Path("count") @Produces("application/json") @Consumes("application/json") long count(@QueryParam("search") String search) Counts organizations by search.- Parameters:
search- text to look for.- Returns:
- the number of organizations that match the search.
- Since:
- Keycloak 26.3
-
count
@GET @Path("count") @Produces("application/json") @Consumes("application/json") long count(@QueryParam("search") String search, @QueryParam("exact") Boolean exact) Counts organizations by search.- Parameters:
search- text to look for.exact- iftrue, the organizations will be searched using exact match for thesearchparam - i.e. either the organization name or one of its domains must match exactly thesearchparam. If false, the method returns all organizations whose name or (domains) partially match thesearchparam.- Returns:
- the number of organizations that match the search.
- Since:
- Keycloak 26.3
-
countByAttribute
@GET @Path("count") @Produces("application/json") @Consumes("application/json") long countByAttribute(@QueryParam("q") String searchQuery) Counts 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:
- the number of the organizations that match the attribute query.
- Since:
- Keycloak 26.3
-
members
-