Class UserAdminResource
java.lang.Object
com.atlassian.bamboo.plugins.rest.user.UserAdminResource
@Path("admin/users")
@Consumes("application/json")
@Produces("application/json")
public class UserAdminResource
extends Object
REST resource to manage users in Bamboo.
- Since:
- 6.6
-
Constructor Summary
ConstructorDescriptionUserAdminResource
(BambooAuthenticationContext bambooAuthenticationContext, BambooPermissionManager bambooPermissionManager, BambooUserManager bambooUserManager, com.atlassian.crowd.embedded.api.CrowdDirectoryService crowdDirectoryService, com.atlassian.crowd.embedded.api.CrowdService crowdService, PaginationService paginationService, RestUserAccessTokenService restUserAccessTokenService, com.atlassian.struts.TextProvider textProvider, com.atlassian.sal.api.transaction.TransactionTemplate transactionTemplate, UserRenameService userRenameService, ExtendedAuthorManager extendedAuthorManager) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
assignGroups
(String userName, List<String> groupsToAssign) javax.ws.rs.core.Response
changeUserPassword
(RestUserPasswordUpdate passwordChangeRequest) javax.ws.rs.core.Response
createUser
(RestNewUser newUser) javax.ws.rs.core.Response
createUserRepositoryAlias
(String userName, List<String> userAliases) javax.ws.rs.core.Response
deleteUser
(String userName) findAssignedGroups
(String userName, String filter, PageRequest pageRequest, ExpansionParam expansion, javax.ws.rs.core.UriInfo uriInfo) findUnassignedGroups
(String userName, String filter, PageRequest pageRequest, ExpansionParam expansion, javax.ws.rs.core.UriInfo uriInfo) findUnassignedUserRepositoryAliases
(String filter, String userName, PageRequest pageRequest, ExpansionParam expansion, javax.ws.rs.core.UriInfo uriInfo) getUserAccessTokens
(String userName, PageRequest pageRequest, ExpansionParam expansion, javax.ws.rs.core.UriInfo uriInfo) getUserRepositoryAliases
(String userName, PageRequest pageRequest, ExpansionParam expansion, javax.ws.rs.core.UriInfo uriInfo) getUsers
(String filter, PageRequest pageRequest, ExpansionParam expansion, javax.ws.rs.core.UriInfo uriInfo) javax.ws.rs.core.Response
renameUser
(RestUserRenameRequest userRenameRequest) javax.ws.rs.core.Response
revokeUserToken
(String userName, String tokenId) javax.ws.rs.core.Response
unassignGroups
(String userName, List<String> groupsToRemove) javax.ws.rs.core.Response
unlinkUserRepositoryAlias
(String userName, RestUserAlias alias)
-
Constructor Details
-
UserAdminResource
@Inject public UserAdminResource(BambooAuthenticationContext bambooAuthenticationContext, BambooPermissionManager bambooPermissionManager, BambooUserManager bambooUserManager, com.atlassian.crowd.embedded.api.CrowdDirectoryService crowdDirectoryService, com.atlassian.crowd.embedded.api.CrowdService crowdService, PaginationService paginationService, RestUserAccessTokenService restUserAccessTokenService, com.atlassian.struts.TextProvider textProvider, com.atlassian.sal.api.transaction.TransactionTemplate transactionTemplate, UserRenameService userRenameService, ExtendedAuthorManager extendedAuthorManager)
-
-
Method Details
-
getUsers
@GET public RestPageModel<RestUserDetails> getUsers(@QueryParam("filter") @DefaultValue("") String filter, @BeanParam PageRequest pageRequest, @BeanParam ExpansionParam expansion, @Context javax.ws.rs.core.UriInfo uriInfo) -
createUser
@POST public javax.ws.rs.core.Response createUser(RestNewUser newUser) throws WebValidationException - Throws:
WebValidationException
-
deleteUser
@DELETE @Path("{name : (.+)?}") public javax.ws.rs.core.Response deleteUser(@PathParam("name") String userName) throws WebValidationException - Throws:
WebValidationException
-
renameUser
@PUT @Path("rename") public javax.ws.rs.core.Response renameUser(RestUserRenameRequest userRenameRequest) throws UserRenameException, WebValidationException -
changeUserPassword
@PUT @Path("credentials") public javax.ws.rs.core.Response changeUserPassword(RestUserPasswordUpdate passwordChangeRequest) throws WebValidationException, com.atlassian.user.EntityException - Throws:
WebValidationException
com.atlassian.user.EntityException
-
assignGroups
@POST @Path("{name : (.+)?}/groups") public javax.ws.rs.core.Response assignGroups(@PathParam("name") String userName, List<String> groupsToAssign) throws WebValidationException - Throws:
WebValidationException
-
unassignGroups
@DELETE @Path("{name : (.+)?}/groups") public javax.ws.rs.core.Response unassignGroups(@PathParam("name") String userName, List<String> groupsToRemove) throws WebValidationException - Throws:
WebValidationException
-
findAssignedGroups
@GET @Path("{name : (.+)?}/assigned-groups") public RestPageModel<RestGroup> findAssignedGroups(@PathParam("name") String userName, @QueryParam("filter") @DefaultValue("") String filter, @BeanParam PageRequest pageRequest, @BeanParam ExpansionParam expansion, @Context javax.ws.rs.core.UriInfo uriInfo) -
findUnassignedGroups
@GET @Path("{name : (.+)?}/unassigned-groups") public RestPageModel<RestGroup> findUnassignedGroups(@PathParam("name") String userName, @QueryParam("filter") @DefaultValue("") String filter, @BeanParam PageRequest pageRequest, @BeanParam ExpansionParam expansion, @Context javax.ws.rs.core.UriInfo uriInfo) throws com.atlassian.user.EntityException - Throws:
com.atlassian.user.EntityException
-
findUnassignedUserRepositoryAliases
@GET @Path("{name : (.+)?}/unassigned-aliases") public RestPageModel<RestUserAlias> findUnassignedUserRepositoryAliases(@QueryParam("filter") @DefaultValue("") String filter, @PathParam("name") String userName, @BeanParam PageRequest pageRequest, @BeanParam ExpansionParam expansion, @Context javax.ws.rs.core.UriInfo uriInfo) -
getUserRepositoryAliases
@GET @Path("{name : (.+)?}/alias") public RestPageModel<RestUserAlias> getUserRepositoryAliases(@PathParam("name") String userName, @BeanParam PageRequest pageRequest, @BeanParam ExpansionParam expansion, @Context javax.ws.rs.core.UriInfo uriInfo) -
createUserRepositoryAlias
-
unlinkUserRepositoryAlias
@DELETE @Path("{name : (.+)?}/alias") public javax.ws.rs.core.Response unlinkUserRepositoryAlias(@PathParam("name") String userName, RestUserAlias alias) -
getUserAccessTokens
@GET @Path("{name : (.+)?}/access-token") public RestPageModel<RestAccessToken> getUserAccessTokens(@PathParam("name") String userName, @BeanParam PageRequest pageRequest, @BeanParam ExpansionParam expansion, @Context javax.ws.rs.core.UriInfo uriInfo) -
revokeUserToken
@DELETE @Path("{name : (.+)?}/access-token/{tokenId}") public javax.ws.rs.core.Response revokeUserToken(@PathParam("name") String userName, @PathParam("tokenId") String tokenId) throws WebValidationException - Throws:
WebValidationException
-