# \GroupsApi All URIs are relative to *https://your-domain.atlassian.net* Method | HTTP request | Description ------------- | ------------- | ------------- [**add_user_to_group**](GroupsApi.md#add_user_to_group) | **POST** /rest/api/2/group/user | Add user to group [**bulk_get_groups**](GroupsApi.md#bulk_get_groups) | **GET** /rest/api/2/group/bulk | Bulk get groups [**create_group**](GroupsApi.md#create_group) | **POST** /rest/api/2/group | Create group [**find_groups**](GroupsApi.md#find_groups) | **GET** /rest/api/2/groups/picker | Find groups [**get_group**](GroupsApi.md#get_group) | **GET** /rest/api/2/group | Get group [**get_users_from_group**](GroupsApi.md#get_users_from_group) | **GET** /rest/api/2/group/member | Get users from group [**remove_group**](GroupsApi.md#remove_group) | **DELETE** /rest/api/2/group | Remove group [**remove_user_from_group**](GroupsApi.md#remove_user_from_group) | **DELETE** /rest/api/2/group/user | Remove user from group ## add_user_to_group > crate::models::Group add_user_to_group(request_body, groupname, group_id) Add user to group Adds a user to a group. **[Permissions](#permissions) required:** Site administration (that is, member of the *site-admin* [group](https://confluence.atlassian.com/x/24xjL)). ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **request_body** | [**::std::collections::HashMap**](serde_json::Value.md) | The user to add to the group. | [required] | **groupname** | Option<**String**> | As a group's name can change, use of `groupId` is recommended to identify a group. The name of the group. This parameter cannot be used with the `groupId` parameter. | | **group_id** | Option<**String**> | The ID of the group. This parameter cannot be used with the `groupName` parameter. | | ### Return type [**crate::models::Group**](Group.md) ### Authorization [OAuth2](../README.md#OAuth2), [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## bulk_get_groups > crate::models::PageBeanGroupDetails bulk_get_groups(start_at, max_results, group_id, group_name) Bulk get groups Returns a [paginated](#pagination) list of groups. **[Permissions](#permissions) required:** *Browse users and groups* [global permission](https://confluence.atlassian.com/x/x4dKLg). ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **start_at** | Option<**i64**> | The index of the first item to return in a page of results (page offset). | |[default to 0] **max_results** | Option<**i32**> | The maximum number of items to return per page. | |[default to 50] **group_id** | Option<[**Vec**](String.md)> | The ID of a group. To specify multiple IDs, pass multiple `groupId` parameters. For example, `groupId=5b10a2844c20165700ede21g&groupId=5b10ac8d82e05b22cc7d4ef5`. | | **group_name** | Option<[**Vec**](String.md)> | The name of a group. To specify multiple names, pass multiple `groupName` parameters. For example, `groupName=administrators&groupName=jira-software-users`. | | ### Return type [**crate::models::PageBeanGroupDetails**](PageBeanGroupDetails.md) ### Authorization [OAuth2](../README.md#OAuth2), [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## create_group > crate::models::Group create_group(request_body) Create group Creates a group. **[Permissions](#permissions) required:** Site administration (that is, member of the *site-admin* [group](https://confluence.atlassian.com/x/24xjL)). ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **request_body** | [**::std::collections::HashMap**](serde_json::Value.md) | The name of the group. | [required] | ### Return type [**crate::models::Group**](Group.md) ### Authorization [OAuth2](../README.md#OAuth2), [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## find_groups > crate::models::FoundGroups find_groups(account_id, query, exclude, exclude_id, max_results, user_name) Find groups 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](#permissions) required:** *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg). Anonymous calls and calls by users without the required permission return an empty list. ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **account_id** | Option<**String**> | This parameter is deprecated, setting it does not affect the results. To find groups containing a particular user, use [Get user groups](#api-rest-api-2-user-groups-get). | | **query** | Option<**String**> | The string to find in group names. | | **exclude** | Option<[**Vec**](String.md)> | As a group's name can change, use of `excludeGroupIds` is recommended to identify a group. A group to exclude from the result. To exclude multiple groups, provide an ampersand-separated list. For example, `exclude=group1&exclude=group2`. This parameter cannot be used with the `excludeGroupIds` parameter. | | **exclude_id** | Option<[**Vec**](String.md)> | A group ID to exclude from the result. To exclude multiple groups, provide an ampersand-separated list. For example, `excludeId=group1-id&excludeId=group2-id`. This parameter cannot be used with the `excludeGroups` parameter. | | **max_results** | Option<**i32**> | The 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`. | | **user_name** | Option<**String**> | This parameter is no longer available. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. | | ### Return type [**crate::models::FoundGroups**](FoundGroups.md) ### Authorization [OAuth2](../README.md#OAuth2), [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## get_group > crate::models::Group get_group(groupname, group_id, expand) Get group This operation is deprecated, use [`group/member`](#api-rest-api-2-group-member-get). Returns all users in a group. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **groupname** | Option<**String**> | As a group's name can change, use of `groupId` is recommended to identify a group. The name of the group. This parameter cannot be used with the `groupId` parameter. | | **group_id** | Option<**String**> | The ID of the group. This parameter cannot be used with the `groupName` parameter. | | **expand** | Option<**String**> | List of fields to expand. | | ### Return type [**crate::models::Group**](Group.md) ### Authorization [OAuth2](../README.md#OAuth2), [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## get_users_from_group > crate::models::PageBeanUserDetails get_users_from_group(groupname, group_id, include_inactive_users, start_at, max_results) Get users from group Returns a [paginated](#pagination) list of all users in a group. Note that users are ordered by username, however the username is not returned in the results due to privacy reasons. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **groupname** | Option<**String**> | As a group's name can change, use of `groupId` is recommended to identify a group. The name of the group. This parameter cannot be used with the `groupId` parameter. | | **group_id** | Option<**String**> | The ID of the group. This parameter cannot be used with the `groupName` parameter. | | **include_inactive_users** | Option<**bool**> | Include inactive users. | |[default to false] **start_at** | Option<**i64**> | The index of the first item to return in a page of results (page offset). | |[default to 0] **max_results** | Option<**i32**> | The maximum number of items to return per page. | |[default to 50] ### Return type [**crate::models::PageBeanUserDetails**](PageBeanUserDetails.md) ### Authorization [OAuth2](../README.md#OAuth2), [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## remove_group > remove_group(groupname, group_id, swap_group, swap_group_id) Remove group Deletes a group. **[Permissions](#permissions) required:** Site administration (that is, member of the *site-admin* strategic [group](https://confluence.atlassian.com/x/24xjL)). ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **groupname** | Option<**String**> | As a group's name can change, use of `groupId` is recommended to identify a group. The name of the group. This parameter cannot be used with the `groupId` parameter. | | **group_id** | Option<**String**> | The ID of the group. This parameter cannot be used with the `groupId` parameter. This parameter cannot be used with the `groupName` parameter. | | **swap_group** | Option<**String**> | As a group's name can change, use of `swapGroupId` is recommended to identify a group. The group to transfer restrictions to. Only comments and worklogs are transferred. If restrictions are not transferred, comments and worklogs are inaccessible after the deletion. This parameter cannot be used with the `swapGroupId` parameter. | | **swap_group_id** | Option<**String**> | The ID of the group to transfer restrictions to. Only comments and worklogs are transferred. If restrictions are not transferred, comments and worklogs are inaccessible after the deletion. This parameter cannot be used with the `swapGroup` parameter. | | ### Return type (empty response body) ### Authorization [OAuth2](../README.md#OAuth2), [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## remove_user_from_group > remove_user_from_group(account_id, groupname, group_id, username) Remove user from group Removes a user from a group. **[Permissions](#permissions) required:** Site administration (that is, member of the *site-admin* [group](https://confluence.atlassian.com/x/24xjL)). ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **account_id** | **String** | The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*. | [required] | **groupname** | Option<**String**> | As a group's name can change, use of `groupId` is recommended to identify a group. The name of the group. This parameter cannot be used with the `groupId` parameter. | | **group_id** | Option<**String**> | The ID of the group. This parameter cannot be used with the `groupName` parameter. | | **username** | Option<**String**> | This parameter is no longer available. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. | | ### Return type (empty response body) ### Authorization [OAuth2](../README.md#OAuth2), [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)