Filter issue - id, topic by username and status

I am trying to figure out the rest api to get the JIRA issues assigned to a user X with status TO DO, and it must return the JIRA id, issue topic, issue status and ignore all other information like comments, issues, description etc.

api i am looking for i assume it must be like this,

curl -X GET -u saravana:xyz http://xyz.yza.local/rest/api/2/search?user=saravana&status=todo

 

return value must be,

`[ { "id" : "123", "issue" : "JIRA rest api, fetch the user specific issue", "status" : "TO DO"}........more issues]`

 

 

1 answer

1 accepted

1 votes

You're not far off, try 

curl -D- -u saravana:xyz -X GET -H "Content-Type: application/json"  http://xyz.yza.local/rest/api/2/search?jql=status=TO+DO

To get just the id, summary and status (not that you need status, because you know it's TO DO already because that's what you're searching for), add

&fields=key,summary,status

hi Nic, thanks for your info... i tried adding the user filter, as curl -u saravana:xyz -X GET -H "Content-Type: application/json" http://xyz.yza.local/rest/api/2/search?jql=status=TO+DO&user=saravana.kumar&fields=key,summary,status ............... somehow, &user=saravana.kumar is not having any effect... it fetches all people's issues

Yes, that's correct. You've used the clause "user". Unless you have a custom field called "user", it's nonsense so the API is ignoring it. I suspect you mean reporter, assignee, creator, watcher or collaborator...

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,990 views 12 18
Join discussion

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