When using the "Get user email bulk" (/rest/api/3/user/email/bulk) with a single accountId parameter, I am able to get the email address associated with the id, e.g
/rest/api/3/user/email/bulk?accountId={accountId}
but I have tried the following and both result in a 200 response that has an empty array:
/rest/api/3/user/email/bulk?accountId={accountId1},{accountId2}
/rest/api/3/user/email/bulk?accountId={accountId1}&&accountId={accountId2}
What is the correct syntax for using multiple ids?
Hi @wei
I would like to ask, did you use an Array<string> to construct the request that you're trying to get? I would expect an array of strings to look like below.
/rest/api/3/user/email/bulk?accountId=[{accountId}, {accountId}]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just want to ask, did you register with Atlassian to get access to this API as it is a private API after all?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yep, I had requested access to email addresses from Atlassian and received approval for it a while back. I figure it might be an issue with syntax for the URI, since with "Get user email" (/rest/api/3/user/email?accountId={accountId1}) I am able to get the correct results for a single accountId.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@wei Yeah, it should probably be the syntax or do they want you to feed the data from a list into the endpoint
lists = [accountId1, accountId2, accountId3]
for x in lists:
run = /rest/api/3/user/email?accountId=x
I'm not sure if this what's expected, but if a single entry works, then doing like above should.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.