Interface UserApi

All Superinterfaces:
ApiService

@Path("/api/v1/users") @Consumes("application/json") @Produces("application/json") public interface UserApi extends ApiService
Operations with users.
  • Method Details

    • serviceName

      default String serviceName()
      Specified by:
      serviceName in interface ApiService
    • 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

      @PUT jakarta.ws.rs.core.Response updateUsersRest(Collection<UserAccount> userAccounts)
    • 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 user
      fullName - The (optional) full name of the user
      loginAllowed - The (optional) flag for login permission
      external - The (optional) flag for external users
      page - The (optional) page of results to return. Default value is 0
      resultsPerPage - The (optional) number of results per page. Default value is 100
      Returns:
      users found
    • getUser

      @GET @Path("/{username:.*}") UserAccount getUser(@PathParam("username") String username)
      Returns a single user
      Parameters:
      username - the identifier of the user
      Returns:
      user found
    • createUser

      UserAccount createUser(UserAccount userAccount)
      Creates a new user
      Parameters:
      userAccount - The user properties
      Returns:
      the new user created
    • updateUser

      UserAccount updateUser(UserAccount userAccount)
      Updates a user.
      Parameters:
      userAccount - The user properties
      Returns:
      the updated user
    • updateUsers

      void updateUsers(Collection<UserAccount> userAccounts)
      Updates a collection of users
      Parameters:
      userAccounts - Collection of user properties
    • updatePassword

      void updatePassword(String username, String currentPassword, String newPassword)
      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

      void deleteUser(String username)
      Deletes a user.
      Parameters:
      username - The identifier of the user