Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to get account Id from Jira Rest API

Sunil Thakur September 3, 2020

Hi,

I have been trying to add users to a group using Rest API v2 and in order to do so, I need to have the account Id of the User. But my user API is not returning the account Id of the users.

 

Please help.

 

Thanks

2 answers

0 votes
Ezequiel Fariña
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 4, 2020

Any idea anyone? I see many people having this issue:

  • The route and param “/user/search?query=xxx” are not working with the error message “The username query parameter was not provided”.
  • In the opposite way of this “/groupuserpicker?query=xxx” who works but doesn’t provide ‘AccountId’ (?).
  • The route and param “/user/search?username=xxx” are working well also but still no ‘AccountId’ in the result (?).
  • /user/migration/bulk is not there anymore apparently
0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 4, 2020

Hi @Sunil Thakur 

Have you tried to first perform a call to get a list of the users, and find the account ID you need for the user in the JSON? Then you could use that to add them to the group with another call.

The call to get the users list is: /rest/api/3/users/search?maxResults=1000

Note that unlike other REST API calls for JIRA, this one can return up to 1000 records.  You need to add paging with startAt if you have more than 1000 records.

 

Best regards,

Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events