# Class: GroupsClient

## GroupsClient

## Constructor

#### new GroupsClient(jiraClient)

Used to access Jira REST endpoints in '/rest/api/2/groups'

##### Parameters:

Name | Type | Description
--- | --- | ---
`jiraClient` | JiraClient |

Source:
  - api/groups.js, line 5

### Methods

#### findGroups(opts, callback)

Returns groups with substrings matching a given query. This is mainly for use with the group picker, so the returned groups contain html to be used as picker suggestions. The groups are also wrapped in a single response object that also contains a header for use in the picker, specifically Showing X of Y matching groups. The number of groups returned is limited by the system property "jira.ajax.autocomplete.limit" The groups will be unique and sorted.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The request options to use in the Jira API. ###### Properties
Name | Type | Description
--- | --- | ---
`query` | string | A string against which to match groups. Leave this blank to return all groups.
`exclude` | string | A string specifying groups to exclude.
`maxResults` | number | The maximum number of results to return.
`callback` |  | Called when the groups have been retrieved.

Source:
  - api/groups.js, line 14