JIRA REST API: How to search groups by case insensitive value

Hello, everyone

How can I ignore case sensitiveness of query parameter during getting groups with the help /rest/api/2/groups/picker?

Right now:
/rest/api/2/groups/picker?query=aaa returns group Test aaa.
/rest/api/2/groups/picker?query=aAa returns group Test aAa.

What I need is - get both groups (Test aaa and Test aAa ) using rest/api/2/groups/picker?query=aaa or rest/api/2/groups/picker?query=AAA

Thanks.

1 answer

This widget could not be displayed.

Hi Natalia,

One thing you can do is change the = to a ~ which performs a fuzzy search.  If I search with the = sign I get one result:

{"header":"Showing 1 of 1 matching groups","total":1,"groups":[{"name":"aaa","html":"<b>aaa</b>","labels":[]}]}

When I use the tilde I get multiple results:

{"header":"Showing 3 of 3 matching groups","total":3,
"groups":[{"name":"aaa","html":"aaa","labels":[]},
{"name":"jira-administrators","html":
"jira-administrators","labels":
[{"text":"Admin","title":"Users added to this group will be given administrative access","type":"ADMIN"},
{"text":"JIRA Software","title":"Users added to this group will be given access to <strong>JIRA Software</strong>","type":"SINGLE"}]},
{"name":"jira-software-users","html":"jira-software-users","labels":
[{"text":"JIRA Software","title":"Users added to this group will be given access to <strong>JIRA Software</strong>","type":"SINGLE"}]}]}

For more information about searching in JIRA see the Search syntax for text fields knowledge base article.

Cheers,

Branden

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted 12 hours ago in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

39 views 1 0
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