0

I'm trying to get a list of issues assigned to the current logged in user using the JIRA REST API, but I can't find any documentation on how to do that.

What do I need to do in order to get the issues assigned to the current user?

Andrew
  • 227,796
  • 193
  • 515
  • 708

1 Answers1

2

You can specify the issues you want to receive by using jql. In your case rest/api/2/search?jql=assignee=currentuser() should do the trick.

Here is the relevant part of the documentation of the REST api and here is the description of the used jql-function.

Seb
  • 1,721
  • 1
  • 17
  • 30
  • Thanks! I didn't know about `currentuser()`, and it's not mentioned in the docs you linked to. I have a follow up question if you know the answer: http://stackoverflow.com/questions/25210004/how-to-get-jira-agile-issues-assigned-to-the-current-sprint-for-the-current-user – Andrew Aug 08 '14 at 18:32
  • I added the link to the jql-functions to my answer. – Seb Aug 08 '14 at 19:22
  • when I use ```rest/api/2/search?jql=assignee=currentuser()```, I am getting the following error: ```bash: syntax error near unexpected token `('``` But when I use ```rest/api/2/search?jql=assignee=currentuser```, I get following error: ```{"startAt":0,"maxResults":50,"total":0,"issues":[],"warningMessages":["The value 'currentuser' does not exist for the field 'assignee'."]}``` – theashwanisingla Jul 13 '21 at 04:01