I am doing an integration process to create project into Jira 6.0 application. One of the project field requires the username/owner value. The application from which the integration triggers outputs email address. I need to query JIRA to find the username corresponding to this email address. I read about the below URI that takes username as the parameter. (below)
https://DOMAIN.com/rest/api/latest/user/search?username=XYZ or
http://DOMAIN.com/rest/api/latest/user?username=XYZ
But really my parameter here is email address for which i need username as the output. Does JIRA support something like this
https://DOMAIN.com/rest/api/latest/user/search?emailaddress=XYZ</a>@email.comor
http://DOMAIN.com/rest/api/latest/user?emailaddress=XYZ@email.com
How to access username using Jira's REST API?
Hi Frank,
I was able to retrieve the username of a given user using JIRA's REST API:
https://DOMAIN.atlassian.net/rest/api/2/user/search?username=user1@email.com
Where "user1@email.com" is the email address of a given user.
Even if you provide the email address of a user, you need to use the "username" parameter in the URL.
Hope this helps.
Cheers,
Clarissa.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.