public class

GroupResource

extends Object
java.lang.Object
   ↳ com.atlassian.jira.rest.v2.issue.GroupResource

Summary

Public Constructors
GroupResource(GlobalPermissionManager permissionManager, JiraAuthenticationContext authContext, I18nHelper i18n, GroupManager groupManager, GroupService groupService, JiraBaseUrls jiraBaseUrls, SelfLinkBuilder selfLinkBuilder, CrowdService crowdService, UserBeanFactory userBeanFactory, ResponseFactory responses)
Public Methods
Response addUserToGroup(String groupName, UpdateUserToGroupBean userBean)
Adds given user to a group.
Response createGroup(AddGroupBean groupBean)
Creates a group by given group parameter

Returns REST representation for the requested group.

@Deprecated Response getGroup(String groupName, StringList expand)
Returns REST representation for the requested group.
Response getUsersFromGroup(String groupName, boolean includeInactiveUsers, Long startAt, Integer maxResults)
This resource returns a paginated list of users who are members of the specified group and its subgroups.
Response removeGroup(String groupName, String swapGroup)
Deletes a group by given group parameter.
Response removeUserFromGroup(String groupName, String username)
Removes given user from a group.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public GroupResource (GlobalPermissionManager permissionManager, JiraAuthenticationContext authContext, I18nHelper i18n, GroupManager groupManager, GroupService groupService, JiraBaseUrls jiraBaseUrls, SelfLinkBuilder selfLinkBuilder, CrowdService crowdService, UserBeanFactory userBeanFactory, ResponseFactory responses)

Public Methods

public Response addUserToGroup (String groupName, UpdateUserToGroupBean userBean)

Adds given user to a group.

Returns the current state of the group.

Parameters
groupName A name of requested group.
userBean User to add to a group
Returns
  • REST representation of a group

public Response createGroup (AddGroupBean groupBean)

Creates a group by given group parameter

Returns REST representation for the requested group.

Parameters
groupBean a group to add
Returns
  • REST representation of a group

@Deprecated public Response getGroup (String groupName, StringList expand)

Returns REST representation for the requested group. Allows to get list of active users belonging to the specified group and its subgroups if "users" expand option is provided. You can page through users list by using indexes in expand param. For example to get users from index 10 to index 15 use "users[10:15]" expand value. This will return 6 users (if there are at least 16 users in this group). Indexes are 0-based and inclusive.

This resource is deprecated, please use group/member API instead.

Parameters
groupName A name of requested group.
expand List of fields to expand. Currently only available expand is "users".
Returns
  • REST representation of a group

public Response getUsersFromGroup (String groupName, boolean includeInactiveUsers, Long startAt, Integer maxResults)

This resource returns a paginated list of users who are members of the specified group and its subgroups. Users in the page are ordered by user names. User of this resource is required to have sysadmin or admin permissions.

Parameters
groupName a name of the group for which members will be returned.
includeInactiveUsers inactive users will be included in the response if set to true.
startAt the index of the first user in group to return (0 based).
maxResults the maximum number of users to return (max 50).
Returns
  • a paginated list of users in the group.

public Response removeGroup (String groupName, String swapGroup)

Deletes a group by given group parameter.

Returns no content

Parameters
groupName a group to delete
swapGroup a group to transfer visibility restrictions of the group that is being deleted
Returns
  • no content

public Response removeUserFromGroup (String groupName, String username)

Removes given user from a group.

Returns no content

Parameters
groupName A name of requested group.
username User to remove from a group
Returns
  • REST representation of a group