Hey everyone,
Sometimes JIRA returns an empty array in response to the following endpoint
rest/api/2/user/search?query=<email>
for the same <email>. It happens randomly for random emails and I 100% that users with these emails are active and did not hide their email. It started approximately 1 month ago.
Can someone please clarify what can cause the problem and how can I fix it?
Thanks!
I think the GDPR changes are your problem. I get the empty array set everytime my system user doesn't have enough permissions. If you're an org owner and king Jira admin across the board, you should not receive an empty set.
Hello @Viktor Zhemchuzhnikov
Are you saying that the query:
A) Produces the same empty result when re-tried for the same email address (no results, ever, for a particular email address), or
B) Produces the correct result when re-tried (no results, sometimes, for a particular email address)?
If A, then it's a permission issue and you don't have the rights to lookup that person's information, which can be due a wide range of reasons. If B, then it's harder to say why it might be randomly failing.
Also, since you're using Jira Cloud, do you get the same result if you use the v3 User search endpoints instead of the old v2 Find users by query endpoint?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Sunny Ape
It is B case. There was too small number of empty responses (3-5 of them for now) so it is hard to say if some specific group of users is affected or this can happen with everyone. For now it looks random.
Also thanks for suggesting v3 api, I'll test it.
UPDATE:
I wrote a simple script that queries my email every 5 minutes.
v2 endpoint seems to fail at the beginning of every hour (first request for each hour).
v3 endpoint works nice.
So changing to v3 will solve my issue but I do not think it should be the solution since v2 api is not deprecated and v3 is in beta.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Glad to hear you found a solution.
The v3 REST API has been the primary interface for years, and it's the v2 REST API that is more or less 'deprecated' because development of it ended years ago.
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.