How do I do wildcard searches in the rest API?

These 2 return an errors:

 

https://MyDom.atlassian.net/rest/api/latest/search?jql=project=PROJ+AND+reporter~joe*+AND+status!=Closed
https://MyDom.atlassian.net/rest/api/latest/search?jql=project=PROJ+AND+reporter~joe+AND+status!=Closed


This works fine:

https://MyDom.atlassian.net/rest/api/latest/search?jql=project=PROJ+AND+reporter=joe+AND+status!=Closed

1 answer

1 accepted

Hi,

Firstly, not all fields support text searches (reporter does not apparantly) (for more info which fields support it see the documentation) and when performing search characters with wildcards the documentation states 

Wildcard characters need to be enclosed in quote-marks, as they are reserved characters in advanced search. Use quotations, e.g. summary ~ "cha?k and che*"

Keep in mind that when you send the jql as get parameter you will have to urlencode it. Here is an example search with wildcards that works 

 

https://jira.atlassian.com/rest/api/latest/search?jql=project%3D%22Atlassian%20Translations%22%20AND%20summary~%27cas%3F%27

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Sunday in Agility

You asked for it, so we delivered: images on issues have arrived

A picture tells a thousand words. And agility boards have just released their latest feature: cover images on issues – so now your board can tell a story at first glance. Upload attachmen...

338 views 3 11
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