@Consumes(value="application/json") @Produces(value="application/json") @Path(value="groups") public class GroupsMembershipResource extends Object
Constructor and Description |
---|
GroupsMembershipResource(GroupsMembershipController groupsMembershipController,
UsersSearchController usersSearchController) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
addUsersToGroup(DirectoryEntityId groupId,
UserIdentifiersEntityList users)
Adds multiple users to a single group placed in the same directory
|
javax.ws.rs.core.Response |
groupDetails(DirectoryEntityId groupId)
Returns group details
|
javax.ws.rs.core.Response |
groupMembers(DirectoryEntityId groupId,
RestPageRequest pageRequest)
Returns group's direct members (users).
|
javax.ws.rs.core.Response |
removeUsersFromGroup(DirectoryEntityId groupId,
UserIdentifiersEntityList users)
Removes multiple users from single group placed in the same directory
|
javax.ws.rs.core.Response |
searchAdministeredGroups(RestPageRequest pageRequest,
GroupsFilter groupsFilter)
Returns groups that are administered by logged in user
|
javax.ws.rs.core.Response |
searchUsers(DirectoryEntityId groupId,
String userSearch,
int limit)
Returns users that can be assigned to the given group.
|
public GroupsMembershipResource(GroupsMembershipController groupsMembershipController, UsersSearchController usersSearchController)
@POST @Path(value="/query") @ExperimentalApi public javax.ws.rs.core.Response searchAdministeredGroups(@Context RestPageRequest pageRequest, GroupsFilter groupsFilter) throws DirectoryNotFoundException, OperationFailedException, FeatureInaccessibleException
pageRequest
- details about paginggroupsFilter
- the filter that the result should matchDirectoryNotFoundException
OperationFailedException
FeatureInaccessibleException
@GET @Path(value="/{groupId}") public javax.ws.rs.core.Response groupDetails(@PathParam(value="groupId") DirectoryEntityId groupId) throws DirectoryNotFoundException, GroupNotFoundException, OperationFailedException, FeatureInaccessibleException
groupId
- Group's unique identifierDirectoryNotFoundException
GroupNotFoundException
OperationFailedException
FeatureInaccessibleException
@GET @Path(value="/{groupId}/users") public javax.ws.rs.core.Response groupMembers(@PathParam(value="groupId") DirectoryEntityId groupId, @Context RestPageRequest pageRequest) throws DirectoryNotFoundException, OperationFailedException, GroupNotFoundException, FeatureInaccessibleException
groupId
- Group's unique identifierDirectoryNotFoundException
OperationFailedException
GroupNotFoundException
FeatureInaccessibleException
@POST @Path(value="/{groupId}/users/") public javax.ws.rs.core.Response addUsersToGroup(@PathParam(value="groupId") DirectoryEntityId groupId, UserIdentifiersEntityList users) throws DirectoryNotFoundException, GroupNotFoundException, OperationFailedException, DirectoryPermissionException, FeatureInaccessibleException
groupId
- Group's unique identifierusers
- Entity with user's unique identifiersDirectoryNotFoundException
GroupNotFoundException
OperationFailedException
DirectoryPermissionException
FeatureInaccessibleException
@DELETE @Path(value="/{groupId}/users") public javax.ws.rs.core.Response removeUsersFromGroup(@PathParam(value="groupId") DirectoryEntityId groupId, UserIdentifiersEntityList users) throws GroupNotFoundException, DirectoryNotFoundException, OperationFailedException, FeatureInaccessibleException
groupId
- Group's unique identifierusers
- Entity with user's unique identifiersGroupNotFoundException
DirectoryNotFoundException
OperationFailedException
FeatureInaccessibleException
@Path(value="/{groupId}/users/suggestions") @GET public javax.ws.rs.core.Response searchUsers(@PathParam(value="groupId") DirectoryEntityId groupId, @QueryParam(value="search") String userSearch, @QueryParam(value="limit") @DefaultValue(value="100") int limit) throws DirectoryNotFoundException, OperationFailedException, UserNotFoundException, GroupNotFoundException, FeatureInaccessibleException
groupId
- group to which users would be assigneduserSearch
- user search stringlimit
- maximum number of results returned from the searchDirectoryNotFoundException
OperationFailedException
UserNotFoundException
GroupNotFoundException
FeatureInaccessibleException
Copyright © 2021 Atlassian. All rights reserved.
View cookie preferences