Interface UserApi

  • All Superinterfaces:
    ApiService

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

      • serviceName

        default java.lang.String serviceName()
        Specified by:
        serviceName in interface ApiService
      • createUser

        @POST
        @Path("/{username:[^/]+}")
        javax.ws.rs.core.Response createUser​(@PathParam("username")
                                             java.lang.String username,
                                             UserAccount userAccount)
      • updateUser

        @PUT
        @Path("/{username:.*}")
        javax.ws.rs.core.Response updateUser​(@PathParam("username")
                                             java.lang.String username,
                                             UserAccount userAccount)
      • updateUsersRest

        @PUT
        javax.ws.rs.core.Response updateUsersRest​(java.util.Collection<UserAccount> userAccounts)
      • updatePassword

        @POST
        @Path("/{username:[^/]+}/password")
        javax.ws.rs.core.Response updatePassword​(@PathParam("username")
                                                 java.lang.String username,
                                                 ChangePasswordView changePasswordView)
      • deleteUserRest

        @DELETE
        @Path("/{username:.*}")
        javax.ws.rs.core.Response deleteUserRest​(@PathParam("username")
                                                 java.lang.String username)
      • findUsers

        @GET
        java.util.List<UserAccount> findUsers​(@QueryParam("email")
                                              java.lang.String email,
                                              @QueryParam("fullName")
                                              java.lang.String fullName,
                                              @QueryParam("loginAllowed")
                                              java.lang.Boolean loginAllowed,
                                              @QueryParam("external")
                                              java.lang.Boolean external,
                                              @QueryParam("lastActiveAfter")
                                              java.util.Date lastActiveAfter,
                                              @QueryParam("lastActiveBefore")
                                              java.util.Date lastActiveBefore,
                                              @DefaultValue("0") @QueryParam("page")
                                              java.lang.Long page,
                                              @DefaultValue("100") @QueryParam("resultsPerPage")
                                              java.lang.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")
                            java.lang.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​(java.util.Collection<UserAccount> userAccounts)
        Updates a collection of users
        Parameters:
        userAccounts - Collection of user properties
      • updatePassword

        void updatePassword​(java.lang.String username,
                            java.lang.String currentPassword,
                            java.lang.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​(java.lang.String username)
        Deletes a user.
        Parameters:
        username - The identifier of the user