Package com.xebialabs.xlrelease.api.v1
Interface UserApi
- All Superinterfaces:
ApiService
@Path("/api/v1/users")
@Consumes("application/json")
@Produces("application/json")
public interface UserApi
extends ApiService
Operations with users.
-
Field Summary
Fields inherited from interface com.xebialabs.xlrelease.api.ApiService
DEFAULT_RESULTS_PER_PAGE, DEFAULT_RESULTS_PER_PAGE_STRING, DEPTH, ORDER_BY, PAGE, PAGE_IS_OFFSET, RESULTS_PER_PAGE, ROLE_IDS_DATA -
Method Summary
Modifier and TypeMethodDescriptioncreateUser(UserAccount userAccount) Creates a new userjakarta.ws.rs.core.ResponsecreateUser(String username, UserAccount userAccount) voiddeleteUser(String username) Deletes a user.jakarta.ws.rs.core.ResponsedeleteUserRest(String username) findUsers(String email, String fullName, Boolean loginAllowed, Boolean external, Date lastActiveAfter, Date lastActiveBefore, Long page, Long resultsPerPage) Returns the users in the system.Returns a single userdefault Stringjakarta.ws.rs.core.ResponseupdatePassword(String username, ChangePasswordView changePasswordView) voidupdatePassword(String username, String currentPassword, String newPassword) Updates a user password.updateUser(UserAccount userAccount) Updates a user.jakarta.ws.rs.core.ResponseupdateUser(String username, UserAccount userAccount) voidupdateUsers(Collection<UserAccount> userAccounts) Updates a collection of usersjakarta.ws.rs.core.ResponseupdateUsersRest(Collection<UserAccount> userAccounts)
-
Method Details
-
serviceName
- Specified by:
serviceNamein interfaceApiService
-
createUser
@POST @Path("/{username:[^/]+}") jakarta.ws.rs.core.Response createUser(@PathParam("username") String username, UserAccount userAccount) -
updateUser
@PUT @Path("/{username:.*}") jakarta.ws.rs.core.Response updateUser(@PathParam("username") String username, UserAccount userAccount) -
updateUsersRest
-
updatePassword
@POST @Path("/{username:[^/]+}/password") jakarta.ws.rs.core.Response updatePassword(@PathParam("username") String username, ChangePasswordView changePasswordView) -
deleteUserRest
@DELETE @Path("/{username:.*}") jakarta.ws.rs.core.Response deleteUserRest(@PathParam("username") String username) -
findUsers
@GET List<UserAccount> findUsers(@QueryParam("email") String email, @QueryParam("fullName") String fullName, @QueryParam("loginAllowed") Boolean loginAllowed, @QueryParam("external") Boolean external, @QueryParam("lastActiveAfter") Date lastActiveAfter, @QueryParam("lastActiveBefore") Date lastActiveBefore, @DefaultValue("0") @QueryParam("page") Long page, @DefaultValue("100") @QueryParam("resultsPerPage") Long resultsPerPage) Returns the users in the system.- Parameters:
email- The (optional) email of the userfullName- The (optional) full name of the userloginAllowed- The (optional) flag for login permissionexternal- The (optional) flag for external userspage- The (optional) page of results to return. Default value is 0resultsPerPage- The (optional) number of results per page. Default value is 100- Returns:
- users found
-
getUser
Returns a single user- Parameters:
username- the identifier of the user- Returns:
- user found
-
createUser
Creates a new user- Parameters:
userAccount- The user properties- Returns:
- the new user created
-
updateUser
Updates a user.- Parameters:
userAccount- The user properties- Returns:
- the updated user
-
updateUsers
Updates a collection of users- Parameters:
userAccounts- Collection of user properties
-
updatePassword
Updates a user password. External users can't be updated with this operation.- Parameters:
username- The identifier of the user.currentPassword- Current password of the user, it only has to be supplied when changing your own password.newPassword- The new password.
-
deleteUser
Deletes a user.- Parameters:
username- The identifier of the user
-