Manage Color Palettes
Introduction This step-by-step article explains how to change the color palette so that you can use custom colors for elements of the Sisense dashboards. (This will work in V5.7.5 and higher). How to get your existing palettes 1. Go to v0.9 GET / palettes and hit “RUN” How to create a new schema 1. Go to POST / palettes and insert the required schema into the “Value” input box and hit “RUN”. 2. Use the following syntax and update the “colors” and “name” parameters according to your needs. You can add up to 16 colors in a custom palette. In addition, you can modify the following parameters: 'isDefault' = true means that new dashboards will be created with this palette by default. There can only be one default palette at any time. 'sortOrder' - determines the order of the palette in the palettes list displayed in the dashboard drop-down { "colors": [ "#ff0000", "#001c5a", "#cfeb00", "#2dff00", "#00a79b", "#218A8C" ], "name": "MyPalette", "isDefault": true, "sortOrder": 10 } 3. The new palette will be added to your Dashboard Palettes. How to delete a palette: 1. Go to Delete / palettes / {name} and insert the required schema into the “Value” input box 2. Insert the name of the Palette you wish to delete into the Value input box and hit “RUN” 3. The Palette will be deleted from the Dashboard Palettes2.8KViews4likes0CommentsREST API - Adding Data Level Security
When building code to automate the process of adding users (or groups), it may be beneficial to add security around those users. Follow the steps below to learn how to add data level security through the REST API: Step 1 From your SiSense home page, navigate to the Manage tab and choose the option for REST API. From here, click on the link to the REST API Reference interface. Step 2 From here, choose the 0.9 version and expand the Elasticube section and scroll down to the POST /elasticubes/datasecurity section. Step 3 The sample code below shows a valid JSON object to use as part of the REST API request. Starting from the sample code, replace the value for party with a user identifier that already exists in your system. Then paste the code into the REST API interface and click run. You should see a response of 200, which indicates a successful operation. [{ "server": "LocalHost", "elasticube": "Sample Lead Generation", "table": "Lead Generation", "column": "Country", "datatype": "text", "shares": [{ "party": "5c0f85690ca2f66cc242e266", "type": "user" }], "members": [ "United States", "England" ] }] Notes The server name value is case sensitive, so make sure it matches with your system. The sample provided is specific to one of the sample databases that comes with SiSense. To modify this to a different system, just update necessary fields to include your specifications. The sample provided is an array that consists of a single element. This could be modified to contain several entries all sent at once.1.8KViews1like2CommentsSwitching All Dashboards Sources From One Source To Another
In some cases user would like to change the source of all dashboards that are using one source to a different source. This can be a time consuming process if you have multiple dashboards. Instead of changing one dashboard at a time, there's a way to do so all at once. Open your Admin page and go to the REST API section In V1 go to Admin > POST /dashboards/{server}/{title}/replace_datasource In Server enter the name the name of the server *If you are using localhost - Enter LocalHost with uppercase "L" and "H" Title Enter the name of the old data source name. In Datasource it can be a bit tricky, what I will recommend is switching one dashboard manually to the new data source and exporting it to a .dash file > Open the dash file using notepad and copy the data-source section: It should look something like this { "title": "Sample ECommerce", "id": "aLOCALHOST_aSAMPLEIAAaECOMMERCE", "address": "LocalHost", "database": "aSampleIAAaECommerce" } Press Run1KViews1like0CommentsRetrieving Or Searching Dashboards Of A Particular User
Question: Is it possible to query for dashboards of a specific user? Answer: the right direction is with the /admin endpoint. You can use it to get the primary instances of all dashboards owned by a specific user by their username/email: For example: /api/v1/dashboards/admin?dashboardType=owner&ownerInfo=true&ownershipType=allRoot&search=owner%3A%20test%40sisense.com&asObject=false A breakdown of the query parameters used: " ownershipType=allRoot" means search all dashboards in the system, even those I (the current logged in user/owner of the token) have no access to " dashboardType=owner" means only get the "owner instance" of each dashboard (we don't need the viewer clones) " ownerInfo=true" isn't really required but it makes the response objects contain full owner info including an email so i can easily validate the results and filter out any incorrect ones, without having to do another call to /users "search=owner%3A%20test%40sisense.com" which unencoded is " owner: [email protected]". this is a free-text search that supports this specific search by username1.2KViews1like0CommentsBeginner Sisense REST API Tips
Three tips for new users working with Sisense's REST API for the first time. 1. If you're running API calls through our Swagger UI (ie, by going to Admin -> REST API -> REST API Reference), you do not need to generate and pass an authentication token. You only need the token when running a call from an outside application. 2. If you receive a 500 response code with an error message of "Internal Server Error" to your POST/PATCH call, that typically indicates there is a syntax error in the payload. To confirm and troubleshoot this, use an online JSON validator (such as JSONLint - https://jsonlint.com/) to review your syntax and identify errors. 3. If you're incorporating our REST API within a program, one tip to accelerate the development process is to use a third-party API tool such as Postman. You can copy the cURL our Swagger UI outputs and paste it in Postman (Import -> Paste Raw Text) to build your API call - just add the Authentication header before running. Once you've verified your call is set up correctly, click Code, then select your language from the dropdown. This will automatically give you a script for the API call in your language.1.9KViews1like1CommentUsing the Datasources API to Execute SQL Query and Download Data into a Python Dataframe
This article guides how to use the Datasources API to execute an SQL query and download data from a cube into a Python data frame. The issue arises when a user cannot find the API in the REST API tab and encounters difficulties in downloading the data into a Python data frame.2.2KViews1like0Comments