public class

GroupResource

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

Summary

Public Constructors
GroupResource(PermissionManager permissionManager, JiraAuthenticationContext authContext, I18nHelper i18n, GroupManager groupManager, GroupService groupService, JiraBaseUrls jiraBaseUrls, CrowdService crowdService, UserBeanFactory userBeanFactory)
Public Methods
@ExperimentalApi Response addUserToGroup(String groupName, UpdateUserToGroupBean userBean)
Adds given user to a group.
@ExperimentalApi Response createGroup(AddGroupBean groupBean)
Creates a group by given group parameter Returns REST representation for the requested group.
Response getGroup(String groupName, StringList expand)
Returns REST representation for the requested group.
@ExperimentalApi Response removeGroup(String groupName, String swapGroup)
Deletes a group by given group parameter.
@ExperimentalApi Response removeUserFromGroup(String groupName, String username)
Removes given user from a group.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public GroupResource (PermissionManager permissionManager, JiraAuthenticationContext authContext, I18nHelper i18n, GroupManager groupManager, GroupService groupService, JiraBaseUrls jiraBaseUrls, CrowdService crowdService, UserBeanFactory userBeanFactory)

Public Methods

@ExperimentalApi public Response addUserToGroup (String groupName, UpdateUserToGroupBean userBean)

@ExperimentalApi

This method is considered usable by external developers but its contracts have not stabilized.

Experimental APIs may be changed at any time before being marked @Internal or @PublicApi.

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

@ExperimentalApi public Response createGroup (AddGroupBean groupBean)

@ExperimentalApi

This method is considered usable by external developers but its contracts have not stabilized.

Experimental APIs may be changed at any time before being marked @Internal or @PublicApi.

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

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.

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

@ExperimentalApi public Response removeGroup (String groupName, String swapGroup)

@ExperimentalApi

This method is considered usable by external developers but its contracts have not stabilized.

Experimental APIs may be changed at any time before being marked @Internal or @PublicApi.

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

@ExperimentalApi public Response removeUserFromGroup (String groupName, String username)

@ExperimentalApi

This method is considered usable by external developers but its contracts have not stabilized.

Experimental APIs may be changed at any time before being marked @Internal or @PublicApi.

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