BipinSasi
BipinSasi

Reputation: 187

JIRA User Lookup By Email

Is there a way to lookup a JIRA user by email (using the REST API Call)? I can't seem to find a function call that covers this ability. I am using JIRA 7.1.2 and need to make a rest call to JIRA to list out email ids based on the alphabets passed.

Upvotes: 0

Views: 727

Answers (1)

edi_allen
edi_allen

Reputation: 1872

You can use the REST API to get a user from his email address.

curl -s -X GET -H "Authorization:Basic dXNlcm5hbWU6cGFzc3dvcmQ=" http://yourjiraurl.com/rest/api/2/user/search?username=username

According to Jira documentation the username parameter will be matched against the username, name or email address.

To get your username password encoded you can use the base64 command in linux.

echo -n username:password | base64
dXNlcm5hbWU6cGFzc3dvcmQ=

Replace this output in the first command since this call can not be made anonymously.

Upvotes: 1

Related Questions