I just wanted to ensure backwards compatibility - an additional parameter would break (java) API
consumers who are currently using the keycloak-admin-client, since they are potentially using the
variant without the parameter.
This would of course be no problem for REST API consumers.
What I see as a problem though is the behaviour change of the search behaviour by default ...
(knowing the current API) I'd rather expect that the search would perform the same as before
with fuzzy matching /by default/ and support for exact match if explicitly stated.
However having a search operation that performs an exact search by
default "feels" more natural to me - so I'm fine with your suggestion as a quick solution :)
Regarding urls:
I'd rather prefer to have some dedicated search sub-resources per entity - but that is a more general topic...
With this approach one would be more flexible with respect to supported searches
that could behave completly different.
Entity lookups by id
/entity/{id}
Dedicated lookup sub-resource for other attribute lookups: (here I'd expect exactly 0 or 1 results)
/entity/lookup/byName?name=someName
/entity/lookup/byEmail?email=someEmail
Dedicated search sub-resources: (here I'd expect 0 or n results)
/entity/search/byName?name=someName
/entity/search/byNameMatching?pattern=someName
/entity/search/byAttributes?firstname=firstname&lastname=lastname
In addition to that one could also allow @POST requests to these (sub-)resources
where the actual parameters are extracted from form-parameters in order
to avoid leaking user information like username, email, etc. in access logs.
I think this would be relevant for an application that deals with security sensitive information
like keycloak does.
Cheers,
Thomas