Sisense

Overview

Sisense for Cloud Data Teams is a business intelligence software formerly known as Periscope Data, with functionality including dashboards, data warehousing, data mining, and predictive analytics.

This Parsons integration with the Sisense REST API v1.0 supports fetching, posting, and deleting shared dashboards.

Note

Authentication

Your site name and an authentication token are required to use the Sisense class. To obtain a token, log in to the Sisense Web Application and follow the instructions in the Sisense REST API documentation. Be sure to select version 1.0 of the API.

Quickstart

To instantiate the Sisense class, you can either store your Sisense credentials as environmental variables (SISENSE_SITE_NAME and SISENSE_API_KEY) or pass them as keyword arguments:

from parsons import Sisense

# First approach: Pass authentication credentials with environmental variables
sisense = Sisense()

# Second approach: Pass authentication credentials as arguments
sisense = Sisense(site_name='my_site_name', api_key='my_api_key')

You can then call various endpoints:

# Get all the shares for a dashboard
sisense.list_shared_dashboards(dashboard_id='1234')

# Publish a dashboard
sisense.publish_shared_dashboard(dashboard_id='1234')

# Publish a chart
sisense.publish_shared_dashboard(dashboard_id='1234', chart_id='567')

# Delete a dashboard
sisense.delete_shared_dashboard(dashboard_id='1234')

API

class parsons.Sisense(site_name=None, api_key=None)[source]

Instantiate the Sisense class.

Args:
site_name: str

The name of the site. Not required if the SISENSE_SITE_NAME environmental variable is set.

api_key: str

The Sisense API Key. Not required if the SISENSE_API_KEY environmental variable is set.

Returns:

Sisense class

publish_shared_dashboard(dashboard_id, chart_id=None, **kwargs)[source]

This method publishes a dashboard or chart using the provided arguments. For available options, see the API documentation. # noqa

Args:
dashboard_id: str or int

The ID of the dashboard (required).

chart_id: str or int

The ID of the chart. Only required for publishing individual charts.

**kwargs:

Optional arguments.

Returns:

Response (dict containing the URL) or an error

list_shared_dashboards(dashboard_id)[source]

List all shares of a given dashboard.

Args:
dashboard_id: str or int

The ID the dashboard (required).

Returns:

Response or an error

delete_shared_dashboard(token)[source]

To delete a shared dashboard you must provide the token for the shared dashboard. The token is the last part of the shared dashboard URL. i.e. if the shared URL is:

https://app.periscopedata.com/shared/9dda9dda-9dda-9dda-9dda-9dda9dda9dda

The token is ‘9dda9dda-9dda-9dda-9dda-9dda9dda9dda’.

Args:
token: str or int

The token of the shared dashboard (required).

Returns:

Response or an error