»»» UPDATED 6/10/2016 «««
This Python script will demonstrate using the REST API for sharing dashboards and folders.
The script includes the following examples:
- Share a dashboard with a single user
- Share a dashboard with a group
- Share a folder with a single user
- Share a folder with a group
- Get the folder ID by the folder name
- Get a list of IDs of the dashboards in a folder
- REST API Key token (see here on how to obtain your token Sisense REST API)
- Python 2.7 installed on your system.
- Admin permissions
To configure the script run on your system You will need to modify the following settings in the script.
|LOG_FILE_NAME||Log file path|
|Admin email address|
Running the Script
First, edit the script's main() function and uncomment the calls you want to use.
The available calls are:
|share_dashboard_with_user(<user name>, <dashboard id>)||
Share a dashboard with a single user.
|share_dashboard_with_group(<group name>, <dashboard id>)||Share a dashboard with a group.|
|share_folder_with_user(<user name>, <folder name>)||Share a folder with a single user.|
|share_folder_with_group(<group name>, <folder name>)||Share a folder with a group.|
|get_folder_id(<folder name>)||Get the folder ID by the folder name.|
|get_dashboards_in_folder(<folder name>)||Get a list of IDs of the dashboards in a folder.|
Then, from a command line window run the following command:
C:\>python <path to script>\updatesSharesAPI.py
Python script attached below.