Interface SessionApi


  • public interface SessionApi
    Provides synchronous access to Cloudstack Sessions

    See Also:
    • Method Detail

      • loginUserInDomainWithHashOfPassword

        @Named("login")
        @GET
        @Consumes("application/json")
        LoginResponse loginUserInDomainWithHashOfPassword​(@QueryParam("username")
                                                          String userName,
                                                          @QueryParam("domain")
                                                          String domain,
                                                          @QueryParam("password")
                                                          String hashedPassword)
        Logs a user into Cloudstack. A successful login attempt will generate a JSESSIONID cookie value that can be passed in subsequent Query command calls until the "logout" command has been issued or the session has expired.
        Parameters:
        userName - user account name
        domain - domain name, if empty defaults to ROOT
        hashedPassword - hashed password (by default MD5)
        Returns:
        login response with session key or null
      • logoutUser

        @Named("logout")
        @GET
        void logoutUser​(@QueryParam("sessionkey")
                        String sessionKey)
        Logs out the user by invalidating the session key
        Parameters:
        sessionKey - user session key