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

This widget could not be displayed.

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
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

262 views 1 3
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