How can I get a list of all the groups using the JIRA REST API?
Use https://docs.atlassian.com/jira/REST/latest/#api/2/groups-findGroups
Reference: https://docs.atlassian.com/jira/REST
Thanks, I should have mentioned that our version 6.3.15 does not have this call available. In any case, how can you use this call to get all the groups. It seems to only match sub-strings in the group names. What can you give the query parameter that will match all group names?
How about getGroup? https://docs.atlassian.com/jira/REST/latest/#api/2/group-getGroup
I tried getGroup but the groupname parameter is required and doesn't accept a regex.
Possible duplicate of: https://community.atlassian.com/t5/JIRA-questions/How-to-find-all-groups-from-JIRA/qaq-p/153895
I think the REST API is not supporting getting all the group names. However, one workaround is to use the FIND groups GET endpoint /rest/api/2/groups/picker, and add a space as query {"query" : " "}. Below is an example of the query I made in postman.
Please note this: "The number of groups returned is limited by the system property "jira.ajax.autocomplete.limit"
That is not completely true. I think it should say "The number of groups returned is by default limited by the system property jira.ajax.autocomplete.limit unless parameter maxResults is specified"
I am not sure if there is an upper limit but it seems you could just get the default number of groups (20), look at "total" attribute returned in the json data, then call again specifying maxResult to what "total" revealed. At least this works for a couple of thousand groups.
It looks like you're new here. Sign in or register to get started.