Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JIRA REST API: How to get all groups?

Rich Scire
Contributor
March 16, 2016

How can I get a list of all the groups using the JIRA REST API?

3 answers

0 votes
Merielle Impreso August 20, 2019

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.

Screen Shot 2019-08-21 at 6.59.49 AM.png

Merielle Impreso August 20, 2019

Please note this: "The number of groups returned is limited by the system property "jira.ajax.autocomplete.limit" 

Peter Heubeck
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 17, 2020

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.

Like Matthew Korich likes this
Rich Scire
Contributor
March 16, 2016

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?

Deleted user March 16, 2016
Rich Scire
Contributor
March 16, 2016

I tried getGroup but the groupname parameter is required and doesn't accept a regex.

Suggest an answer

Log in or Sign up to answer