Customizing User Roles

This topic describes how to customize the permissions given to the Sisense user roles, using Sisense’s REST API. At the bottom of the page, you can find a video tutorial demonstrating the following procedure.

Click here to learn more about each role type.

Note: The API uses a previous terminology for Designers and Viewers. When entering the role name into the operation parameters, use Contributor (for Designer), and Consumer (for Viewer).

Customizing Roles

You can customize the default roles with Sisense’s REST API, by defining which permissions to enable or disable for each role. For example, you can prevent a user from drilling into widgets, or exporting data to a CSV file. On the other hand, you may want to let viewers change the widget type and format the style.

The following table lists all the actions that you can customize using the API. True and False indicate values that you can change. Never indicates values that you cannot change.

Dashboards

DashboardsAdminData AdminData DesignerDesignerViewer
create
Create a new dashboard.
TrueTrueTrueTrueNever
duplicate
Duplicate an existing dashboard.
TrueTrueTrueTrueFalse
change_owner
Change the dashboard' owner.
TrueTrueTrueTrueFalse
toggle_edit_mode
Select between Layout and View modes in the dashboard. Layout mode is the default mode in which you can add new widgets and rearrange them on the dashboard. In View mode, the dashboard cannot be rearranged or edited.
TrueTrueTrueTrueFalse
edit_script
Edit a dashboard using the Sisense JavaScript API.
TrueTrueTrueTrueNever
export_dash
Export a dashboard as a .dash file that can be imported back into Sisense.
TrueTrueTrueTrueNever
export_jpeg
Download a widget as an image in PNG format. The downloaded image represents the current view.
TrueTrueTrueTrueTrue
export_pdf
Export the dashboard to PDF format. The exported file includes the current view.
TrueTrueTrueTrueTrue
restore
Revert changes made in the dashboard to the latest dashboard that was shared.
TrueTrueTrueTrueTrue
copy_to_server
Copy the dashboard to another server.
TrueTrueTrueTrueFalse
import
Import a .dash file into the Sisense Web Application.
TrueTrueTrueTrueNever
select_palette
Change the selected color palette.
TrueTrueTrueTrueNever
replace_datasource
Select a new data source for a dashboard.
TrueTrueTrueTrueFalse
undo_import_dashTrueTrueTrueTrueFalse
Filters     
create
Create a new filter.
TrueTrueTrueTrueFalse
on_off
Switch filters on or off.
TrueTrueTrueTrueTrue
toggle_expansion
Enable the expansion of filter settings to see more filter parameters.
TrueTrueTrueTrueTrue
toggle_auto_update
Include the option to update the dashboard following every change
TrueTrueTrueTrueFalse
modify_type
Include in the filter options 'Ranking' and 'Starred', in addition to 'List' and 'Text'.
TrueTrueTrueTrueFalse
set_defaults
Include in the dashboard menu the option to set the dashboard filters as the default filters for the dashboard.
TrueTrueTrueTrueFalse
advanced
Include the Advanced menu option for creating custom filters.
TrueTrueTrueTrueFalse
use_starred
Include the option to use filters that have been starred
TrueTrueTrueTrueFalse

Widgets

WidgetsAdminData AdminData DesignerDesignerViewer
create
Create a new widget.
TrueTrueTrueTrueNever
delete
Delete a widget.
TrueTrueTrueTrueFalse
rename
Rename a widget.
TrueTrueTrueTrueFalse
duplicate
Duplicate a widget.
TrueTrueTrueTrueNever
copy_to_dashboard
Copy a widget to a dashboard. This functionality allows you to drag and drop widgets to additional dashboards in your Navigation Pane.
TrueTrueTrueTrueFalse
edit_script
Edit a widget using the JavaScript API.
TrueTrueTrueTrueNever
change_type
Change the chart type.
TrueTrueTrueTrueFalse
export_csv
Export a widget's data to a CSV file.
TrueTrueTrueTrueTrue
export_png
Download a widget as an image in the PNG format. The downloaded image represents the current view.
TrueTrueTrueTrueTrue
modify_selection_mode
Enable the option to change the filter behavior between 'Slice' (only filtered items are included in the chart) and 'Highlight' (filters items are highlighted).
TrueTrueTrueTrueFalse
drill_to_anywhere
Enable the option to drill down into a filed to get an in-depth view of a selected value. If False, the user can only drill down with predefined drill hierarchies (if defined).
TrueTrueTrueTrueTrue
add_to_pulse
Include the option to add a widget to Pulse if the widget type is supported.
TrueTrueTrueTrueTrue
Items     
reorder
Reorder the fields and values in the data panel and their representation in the chart.
TrueTrueTrueTrueFalse
modify_type
Enables the option to edit values and categories in the data panel.
TrueTrueTrueTrueNever
on_off
Enable the option to turn fields on or off in the widget.
TrueTrueTrueTrueTrue
select_hierarchies
Include the option to select pre-defined hierarchies.
TrueTrueTrueTrueFalse
Filters     
on_off
Switch filters on or off.
TrueTrueTrueTrueFalse
toggle_expansion
Enable the expansion of filter settings to display more filter parameters.
TrueTrueTrueTrueTrue
modifyTrueTrueTrueTrueFalse
modify_type
Include in the filter options 'Ranking' and 'Starred', in addition to 'List' and 'Text'
TrueTrueTrueTrueFalse
use_starred
Enables the option to star (bookmark as favorite) a filter selection.
TrueTrueTrueTrueFalse

ElastiCubes

This object is not displayed in the Sisense REST API, however, you can still toogle these features through the POST /roles/{idOrName}/manifest/{path} endpoint.

The value of path should be in the format of manage/elasticubes/[value] where [value] is the feature listed in the table below, add or schedule_build.

ElastiCubesAdminData AdminData DesignerDesignerViewer
add
Allows the user to add new ElastiCubes.
TrueTrueTrueFalseFalse
schedule_build
Allows the user to schedule builds for an ElastiCube.
TrueTrueTrueFalseFalse
modify_data_security_rights
Allows editing the row-based data security permissions.
TrueTrueTrueFalseFalse

To change permissions for a user role:

  1. In the Sisense Web Application, click Admin at the top right of the screen, and then REST API in the left menu.
  2. Click REST API Reference to view the API documentation.
  3. In the API Documentation, select version 0.9.
  4. Click on /roles to access the different API operations.
  5. Find the operation that you require (see examples below), and type in the required parameters in the operation. You can click on Model Schema to see and add example code for the parameters.
    When changing a permission for a role, you must use the Path parameter, which defines the permission you want to update and its relative path in the hierarchy that appears in the table above. For example, to change the ‘Create’ setting for dashboard filters, enter dashboards/filters/. For creating dashboards, enter /dashboards. See the reference table above for more settings.
  6. Click RUN to apply the changes.

Here are some examples of what you can do.

See all permissions for all roles

Method: Get /roles

Parameters

Example API Call

/api/roles?includeManifest=true&compiledRoles=true

See all settings for a specific role

Method: GET /roles/{idOrName}

Parameters

Example API Call

/api/roles/consumer?compiledRole=true

Change a specific setting for a specific role

Method: PUT /roles/{idOrName}/manifest/{path}

Parameters

Example API Call

/api/roles/viewer/manifest/dashboards/filters

Note: You can use POST to do the same action, but for POST all other options will be reset to their default settings.

Restore a specific setting for a specific role

Method: DELETE /roles/{idOrName}/manifest/{path}

Parameters

Example API Call

/api/roles/viewer/manifest/dashboards/filters/modify_type

Restore all settings for a specific role

Method: DELETE /roles/{idOrName}/manifest/{path}

Parameters

Example API Call

/api/roles/viewer/manifest/