Class GroupResource

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

@Path("group") @Consumes("application/json") @Produces("application/json") public class GroupResource extends Object
Since:
v6.0
  • Constructor Details

  • Method Details

    • getUsersFromGroup

      @Path("member") @GET public jakarta.ws.rs.core.Response getUsersFromGroup(@QueryParam("groupname") String groupName, @QueryParam("includeInactiveUsers") @DefaultValue("false") boolean includeInactiveUsers, @QueryParam("startAt") @DefaultValue("0") Long startAt, @QueryParam("maxResults") @DefaultValue("50") 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.
    • createGroup

      @POST public jakarta.ws.rs.core.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
      Since:
      6.1
    • removeGroup

      @DELETE public jakarta.ws.rs.core.Response removeGroup(@QueryParam("groupname") String groupName, @QueryParam("swapGroup") String swapGroup)
      Deletes a group by given group parameter.

      Returns no content

      Parameters:
      groupName - (mandatory) The name of the group to delete.
      swapGroup - If you delete a group and content is restricted to that group, the content will be hidden from all users. To prevent this, use this parameter to specify a different group to transfer the restrictions (comments and worklogs only) to.
      Returns:
      no content
      Since:
      6.1
    • addUserToGroup

      @POST @Path("user") public jakarta.ws.rs.core.Response addUserToGroup(@QueryParam("groupname") 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
      Since:
      6.1
    • removeUserFromGroup

      @DELETE @Path("user") public jakarta.ws.rs.core.Response removeUserFromGroup(@QueryParam("groupname") String groupName, @QueryParam("username") 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
      Since:
      6.1