User search api with AccountId as parameter

Hi Team,

I have a use case as below, I need to store user’s details such as accountId, display name, logo(optional) but due to GDPR it’s not advisable to store user names

I need to render user details(names) in a page. How do I get usernames for all accountIDs I stored in my local config as user search api query works with single accountId parameter?

and I can’t run multiple calls as it may exceed 120 secs based on account Ids and delay in page loading

Kindly suggest

Thanks in advance,
Leo

Hi @LeoPrakash1 ,

You can use the Jira REST API endpoint to bulk get users (GET /rest/api/3/user/bulk).

However, when doing so, please be mindful of not searching for too many AAIDs at once or you may get “Request header is too large” in return, as described in below feature request:

Cheers,
Dario

1 Like

Hi @Dario_B, thanks for the suggestion.
but seems to be it supports upto 10 AAIDs

I may need to split my data and run multiple API calls.

thanks for the suggestion though

Regards,
Leo

Hi @LeoPrakash1 ,

You should be able to use more than 10. However, since the AAID have different length and since the request header can grow in size, you may want to run some tests to find a “safe” amount of AAIDs to append to the request URL as parameter.

Cheers,
Dario

1 Like