JIRA REST URI to access username

FireballF April 2, 2014

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?

1 answer

1 vote
cgauterio
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 28, 2014

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.

Suggest an answer

Log in or Sign up to answer