bilak
March 26, 2020, 6:09pm
1
Hello,
is it somehow possible to sort the result of user query?
Like if I want to search with following query
{{keycloakUrl}}/admin/realms/{{keycloakRealm}}/users?search=luk
Am I able to provide sort option - order by firstName,ASC for example?
Thanks
zonaut
March 26, 2020, 10:08pm
2
There doesn’t seem to be an option to do that.
* @param first
* @param email
* @param username
* @param first Pagination offset
* @param maxResults Maximum results size (defaults to 100)
* @return
*/
@GET
@NoCache
@Produces(MediaType.APPLICATION_JSON)
public List<UserRepresentation> getUsers(@QueryParam("search") String search,
@QueryParam("lastName") String last,
@QueryParam("firstName") String first,
@QueryParam("email") String email,
@QueryParam("username") String username,
@QueryParam("first") Integer firstResult,
@QueryParam("max") Integer maxResults,
@QueryParam("briefRepresentation") Boolean briefRepresentation) {
UserPermissionEvaluator userPermissionEvaluator = auth.users();
userPermissionEvaluator.requireQuery();