I'm trying to use the user search to find a user by display name:
Example URL: https://<jira-instance>/rest/api/2/user/search?query=Test
Response:
{ "errorMessages": [ "The username query parameter was not provided" ], "errors": {}}
In order to make this work I also have to supply the `username` attribute which defeats the purpose of the user search.
As far as I can tel, this request should work according to the documentation here: https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-user-search/#api-rest-api-2-user-search-get
Am I doing something wrong here?
Hi @[deleted] ,
Could you try this https://<jira-instance>/rest/api/2/user/search?username=Test
That seems to work, thanks! So, is the query parameter not actually used for anything since if providing the username attribute you're effectively cancelling that out? And, the username attribute actually searches in the displayName as well?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@[deleted] - A query string that is matched against user attributes ( displayName, and emailAddress) to find relevant users. The string can match the prefix of the attribute's value. For example, query=john matches a user with a displayName of John Smith and a user with an emailAddress of johnson@example.com. Required, unless accountId or property is specified.
Kindly accept the answer so that the post can be marked as Solved. Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.