Rest API call to search issues with OR operator

Hi,

I'm making following REST api call to my on-demand JIRA instance.

https://myjira.atlassian.net/rest/api/2/search?fields=summary&jql=(key=AAAA-11) OR (key=AAAA-10)

 issue with KEY AAAA-11 is deleted from my system, so since it is OR operator i'm expecting to get information of AAAA-10 issue in such case (it does exist on system) but I'm getting an error response - 

{
"errorMessages": [
"An issue with key 'AAAA-11' does not exist for field 'key'."
],
"errors": {}
}

Please advice.

Thanks,

Natasha

1 answer

If you need to look for number of issue keys it is better to use "key in (AAAA-10, AAAA-11)". In this case you will not get an error if some key is not present into system.

@Vasiliy Zverev , thank you for quick answer!

Unfortunately got same error with this one - 

jira.jpg

You are making this REST via some JIRA user. Are you sure that this user has a permission to browse this issue?

@Vasiliy Zverev

yes, this is Admin user.

if I make call with jql=key in (AAAA-10)

JIRA returns me the AAAA-10 issue.

AAAA-11 is deleted.

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 ...

3,265 views 14 20
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