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

0 votes

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
Community showcase
Published Apr 22, 2018 in Jira Software

How-to setup a secured Jira Software 7.9.0 on Ubuntu 16.04.4 in less than 30 minutes

...PermissionsStartOnly=true User=www-data Group=www-data ExecStart=/opt/jira/bin/startup.sh ExecStop=/opt/jira/bin/shutdown.sh TimeoutStartSec=120 TimeoutStopSec=600 PrivateTmp=true [Install] WantedBy...

1,678 views 10 12
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