Find Groups

GET {{baseUrl}}/rest/api/3/groups/picker?accountId=<string>&query=<string>&exclude=<string>&exclude=<string>&maxResults=<integer>&userName=<string>

Returns a list of groups whose names contain a query string. A list of group names can be provided to exclude groups from the results.

The primary use case for this resource is to populate a group picker suggestions list. To this end, the returned object includes the html field where the matched query term is highlighted in the group name with the HTML strong tag. Also, the groups list is wrapped in a response object that contains a header for use in the picker, specifically Showing X of Y matching groups.

The list returns with the groups sorted. If no groups match the list criteria, an empty list is returned.

This operation can be accessed anonymously.

Permissions required: Browse projects project permission. Anonymous calls and calls by users without the required permission return an empty list.

Request Params

KeyDatatypeRequiredDescription
accountIdstringThis parameter is deprecated, setting it does not affect the results. To find groups containing a particular user, use Get user groups.
querystringThe string to find in group names.
excludestringA group to exclude from the result. To exclude multiple groups, provide an ampersand-separated list. For example, exclude=group1&amp;exclude=group2.
excludestringA group to exclude from the result. To exclude multiple groups, provide an ampersand-separated list. For example, exclude=group1&amp;exclude=group2.
maxResultsstringThe maximum number of groups to return. The maximum number of groups that can be returned is limited by the system property jira.ajax.autocomplete.limit.
userNamestringThis parameter is no longer available and will be removed from the documentation soon. See the deprecation notice for details.

RESPONSES

status: OK

{&quot;header&quot;:&quot;Showing 20 of 25 matching groups&quot;,&quot;total&quot;:25,&quot;groups&quot;:[{&quot;name&quot;:&quot;jdog-developers&quot;,&quot;html&quot;:&quot;\u003cb\u003ej\u003c/b\u003edog-developers&quot;,&quot;groupId&quot;:&quot;276f955c-63d7-42c8-9520-92d01dca0625&quot;},{&quot;name&quot;:&quot;juvenal-bot&quot;,&quot;html&quot;:&quot;\u003cb\u003ej\u003c/b\u003euvenal-bot&quot;,&quot;groupId&quot;:&quot;6e87dc72-4f1f-421f-9382-2fee8b652487&quot;}]}