Logging Users Out Of Sisense From Your Site
Download: Post Message Introduction The following forum post explains how to log your users out of Sisense from your native application. Purpose Single sign-on (SSO) systems enable your users to authenticate themselves in your online services and then in Sisense with one authentication credential. After your users' session has ended, it is your responsibility to develop and implement the means of logging your users out of Sisense through your application. For example, if your user is logged into Sisense through an embedded iFrame on your site or application and clicks a “Log Out” link on your site, your implementation must invoke the Sisense Logout API. Note, your users' browser may prevent invoking the Sisense Logout API from your application because of CORS (Cross-Origin Resource Sharing). For more information about CORS, click here. One way you can log your users out and overcome CORS is through the Post-Message method. The window.postMessage method securely enables cross-origin communication. The Post-Message plugin attached to this post implements a listener for the windows.postMessage() method. When the windows.postMessage() method is called, it triggers a MessageEvent in the browser. The Post-Message plugin listens for this event and calls the auth/logout method of the Sisense REST API, logging your user out of Sisense. Sisense logout endpoint (GET): /api/v1/authentication/logout The postMessage() method takes two parameters: message: A object to be sent to Sisense that should contain {logout:true}, so the plugin will be triggered only with this parameter included. targetOrigin: The Sisense URL of the window that the message is being sent to including the HTTP heading and the port. For example: postMessage({logout:true},'http://localHost:8081'); Steps 1. Download the Zip file below and extract its files to \...\Sisense\PrismWeb\plugins. If you do not have this folder, create the \plugins folder and then extract the files to it. If you are using version 7.2 and higher unzip the contents into your C:\Program Files\Sisense\app\plugins\ folder. 2. Develop the functionality in your site or application that implements the Post-Message plugin to call the logout method of the Sisense REST API.1.7KViews0likes0CommentsExport a table from the elasticube to a CSV
* Disclaimer: This works for Windows only. It will work in future with Linux versions as well. Once it does, I will update the post. Sometimes, we need to export a table from the Elasticube to a CSV file. We can then import it to the next build, to send it to a colleague, to back up or any other usage. (In the Sisense Desktop version, we could have done it using the export to CSV post plugin. However, this is not available in the WEB ECM). The method described below utilities the API call: http://localhost:8081/api/datasources/LocalHost/ECName/sql?query=select%20*%20from%20TableName&format=csv If there are spaces in the name of the EC or of the table name, use %20. Happy exporting 🙂1.5KViews0likes1CommentPersonio API Pre-Processing Data
Question Is there a way to add pre-processing (python script) to the data that will be uploaded from a custom API connector? Or should I run the script locally on a fixed schedule and use the Sisense API to upload after the data is processed? Answer Some info about your questions (as we already come across with that many times before): You can run any python script that you would like automatically before or after a Build is done using an ElastiCube Plugin , scroll to the part where is talks about python scripts. Sisense doesn't provide an API to modify data within your cube. So if you would like the Python script to do some extra processing before it gets pushed to the cube - you can save that data locally on the Sisense machine in csv format and then use another another post-build plugin to delete that csv once the build is finished. - Notice that you can use any python version you'd like (in their code sample they are using the old 2.7)731Views0likes0CommentsInstalling Python On IIS
Question: Some users might want to install python on their IIS, for example in order to establish SSO by using python code. How can I install it? Solution: In order to do so, follow these steps: Insure you have CGI installed on your IIS: Go to Start -> Control Panel -> Programs and Features -> on the left hand side, go to "Turn Windows Features on or off" -> Under the IIS node, make sure CGI is installed: Download Python for Windows, from python.org (doesn't matter 2.7 or python 3, depends on your preference). Make sure you get the x64 version if you have an x64 version of Windows. Unpack and install that python MSI. Choose the default, which puts python into c:\PythonX (X will be replaced with your Python version) Create a directory to hold your "development" python scripts. Eg, c:\dev\python Set the permissions on the files in the directory c:\dev\python to allow IIS to read and execute. Do this by running these two icacls.exe commands from the command line: cd \dev\python icacls . /grant "NT AUTHORITY\IUSR:(OI)(CI)(RX)" icacls . /grant "Builtin\IIS_IUSRS:(OI)(CI)(RX)" Open the IIS manager, and create a new application. Specify the virtual path as /py and the physical path as c:\dev\python: Within the new IIS application, add a script map for *.py , and map it to c:\python27\python.exe %s %s: create a "HelloWorld.py" file in c:\dev\python with this as the content: print('Content-Type: text/plain') print('') print('Hello, world!') Test that the script is working - invoke in the browser http://localhost/py/helloworld.py *You should be able to use all Python libraries you have installed on your system. *In case that you try to open the script and it returns a 502 error, it means that something is wrong in the script. In such cases, debug it on your IDLE instead through the browser17KViews0likes0CommentsGet License Key for Offline activation by an API call
There is an option to get an activation key using an API GET call to the Sisense licensing server rather than needing to log into the Sisense site to obtain this information. Use case: This method helps generating license keys in a batch when you need to offline-activate many Sisense instances. Mostly used by OEM vendors of Sisense. Please note that currently the offline activation is still performed using the standard installation GUI (manually). Process: To get an activation key, perform a GET call to: http://l.sisense.com/lc/get With the following parameters: email - the licensed user e-mail (not necessary the account owner) password - the user’s password mid - the machine id - as supplied in the activation UI, or by running the exe file. This file should be run in command prompt so you can see the output enc - true Javascript Example: 1 http://l.sisense.com/lc/[email protected]&password=mypassword&mid=AAAABBBCCCDDDEEE111223344&enc=true Authentication token: You will need to ask your Account Manager to deliver you your own authentication token. Add a header named: ‘Content-MD5’ with the token as a value, as part of each call. If the call is successful you should get a 200 OK return code and the activation key in the response body. Was this article helpful?1.6KViews0likes0CommentsDashboard Handbook Creator
This script creates a word-document of the given dashboard IDs. This document includes dashboard name and Widget name,description and image. Config settings.yml Edit settings.yml with your information ! Be carefull running this script. It searches the folder for the widget image and if not found it will try to download it from your sisense server. Generating images can take up some server resources, especially when users are using Sisense. Either run it with a few dashboard IDs or run it at night. Do not delete images downloaded (unless changed). It skips downloads of widgets that are already downloaded and makes it a whole lot faster. Download377Views0likes0CommentsUsing the "desc" Description Parameter of a Sisense Dashboard via the REST API
The description parameter ("desc") of the Sisense dashboard object is notable for its somewhat unique characteristic – it is not accessible or editable through the Sisense Web GUI. Consequently, this parameter can only be programmatically accessed and modified. Despite this limitation, the "desc" parameter proves valuable for storing dashboard descriptions, facilitating programmatic interactions, or embedding usage.2.2KViews0likes0Comments