Logging out from the Cognos TM1 Web URL API

Use the Action=Logout parameter to end the current user session with the URL API.

You apply the logout action to an iframe that is already displaying a TM1® Web object. The logout action ends the session that opened that specific TM1 Web object and also ends the session for any other URL API instances under the same session.

The Logout action uses the following format:

http://localhost:9510/tm1web/UrlApi.jsp#Action=Logout

Example

The following example ends the session that is associated with the iframe and the related TM1 Web object.
function logout() {

   var baseUrl = "http://localhost:9510/tm1web/UrlApi.jsp";

   var webSheet = document.getElementById("websheetId");
   webSheet.src = baseUrl + "#Action=Logout";
};