Class AdminUserResource
java.lang.Object
com.atlassian.confluence.plugins.restapi.resources.AdminUserResource
REST API for
User
management actions that require elevated privileges.- Since:
- 8.2.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
changePassword
(String username, Credentials credentials) Change the password for the user identified by the usernamejavax.ws.rs.core.Response
createUser
(UserDetailsForCreation userDetailsForCreation) Creates a new active user.javax.ws.rs.core.Response
Delete the givenUser
identified by username.javax.ws.rs.core.Response
Disable the givenUser
identified by username.javax.ws.rs.core.Response
Enable the givenUser
identified by username.
-
Constructor Details
-
AdminUserResource
-
-
Method Details
-
createUser
public javax.ws.rs.core.Response createUser(UserDetailsForCreation userDetailsForCreation) throws URISyntaxException, UnsupportedEncodingException Creates a new active user.One of the following options could be used
- Create a user with a specified password. The userName, fullName, email and password needs to be specified
- Create a user with an email notification to the user. The userName, fullName, email and notifyViaEmail (true) needs to be specified
Requirements
- The userName should not be null or blank
- The userName should not contain any of these characters \ , + invalid input: '<' > ' "
- The userName should not contain any whitespace characters
- The userName should not be "anonymous"
- The userName should not contain any upper case characters
- The fullName should not be null or blank
- The fullName should not contain any of these characters invalid input: '<' >
- The fullName should not be "anonymous"
- The email should not be null or blank
- The email should be a valid email address
- If notifyViaEmail is false then the password should not be null or blank
- If notifyViaEmail is true then the password should not be specified
- Parameters:
userDetailsForCreation
- Details of the user to be created- Returns:
- Response A Response with generated UserKey for the created user.
- Throws:
URISyntaxException
UnsupportedEncodingException
-
disable
Disable the givenUser
identified by username. This method is idempotent i.e. if the user is already disabled then no action will be taken.- Parameters:
username
- The username identifying the given user.
-
enable
Enable the givenUser
identified by username. This method is idempotent i.e. if the user is already enabled then no action will be taken.- Parameters:
username
- The username identifying the given user.
-
delete
Delete the givenUser
identified by username. This action is processed asynchronously.- Parameters:
username
- The username identifying the given user.
-
changePassword
Change the password for the user identified by the usernameValidation rules : The new password should not be null or blank
- Parameters:
username
- The username identifying the given user.credentials
- New password for the user.- Returns:
- Response
- Since:
- 8.4.0
-