Forums

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

API search query and userID

Guillaume Seigneuret
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!
February 20, 2020

Since today, searching a user on Atlassian Jira API no longer gives the user ID !

Where can I get the userID ??

curl -D- -u 'user':'pass' -X GET -H "Content-Type: application/json" 'https://honestica.atlassian.net/rest/api/2/user/search?username=s***t'

   "self":"https://honestica.atlassian.net/rest/api/2/user?accountId=5b5***45",
   "accountId":"5b5***45",
   "accountType":"atlassian",
   "emailAddress":"g***e.s***t@l***.fr",
   "avatarUrls":      "48x48":"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/5b5***45/b4fa7808-***-eb131d117b43/128?size=48&s=48",
...
   },
   "displayName":"G***e S***t",
   "active":true,
   "timeZone":"Europe/Paris",
   "locale":"fr_FR"
}

I have the display name as result but no longer the user ID :( 

1 answer

1 accepted

0 votes
Answer accepted
Guillaume Seigneuret
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!
February 20, 2020

Found the solution by myself.

UserID is no longer available. We have the use the accountId instead.

So I have to replace 'name': userID by 'id': accountId in all my payloads.

Thanks Jira for the nice documentation.

yewujie March 30, 2021

Hi, do you know how to get the Account ID through the REST API?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events