JIRA REST URI to access username

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

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 Join to answer
Community showcase
Teodora [Botron]
Published Thursday in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

247 views 0 11
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot