sisense.com

SisenseApp

The object returned from Sisense.connect() allowing access to the Sisense application.

Properties

NameTypeDescription
serverUrlstringContains the full URL for the Sisense instance.
dashboardsobjectEntry point for accessing Sisense dashboards, representing a collection of the dashboard objects currently loaded to memory.

Methods

dashboards.load

app.dashboards.load(dashboardId) → Promise<SisenseDash>

Load a dashboard by OID

Arguments

NameTypeRequiredDescriptionExample
dashboardIdstringYesOID of the dashboard to load'574603d5fc726c3430000037'

Returns

A Promise that resolves to a SisenseDash once the dashboard has been loaded.

Example

app.dashboards.load('574603d5fc726c3430000037').then(function(dash) {
    // your code here
});

dashboards.add

app.dashboards.add(dashboard)

Adds the dashboard object to an enumerable collection on the page which can be then retrieved by numerical index using get().

Arguments

NameTypeRequiredDescription
dashboardSisenseDashYesA dashboard object

Returns

N/A

Example

// Create a blank dashboard object
var myEmptyDashboard = new Dashboard();
// Add dashboard to application
app.dashboards.add(myEmptyDashboard);

dashboards.get

app.dashboards.get(index) → SisenseDash

Gets a dashboard object that was already loaded into memory (using either add() or load()).

Arguments

NameTypeRequiredDescription
indexnumberYes0-based index of the dashboard to retrieve

Returns

N/A

Example

// Create a blank dashboard object
var myEmptyDashboard = new Dashboard();
// Add dashboard to application
app.dashboards.add(myEmptyDashboard);

setTheme L2021.3

app.setTheme(themeOid)Promise

Applies the specified theme (by its oid) to the embedded Sisense UI elements. This action can be reverted using the app.clearTheme method.

Parameters

NameTypeDescription
themeOidstringoid of theme to apply

Returns

A promise that resolves once the theme has been applied.

clearTheme L2021.3

app.clearTheme()Promise

Clears the custom theme applied with the app.setTheme method, reverting to the user's default theme.

Parameters

N/A

Returns

A promise that resolves once the theme has been cleared.

setWat L2024.1

app.setWat(wat)Promise

Reloads SisenseJS with a new WAT. This allows for changing a user's access permissions at runtime, without reloading the entire page.

Parameters

NameTypeDescription
watstringNo

Returns

A promise that resolves once the new WAT has been applied.

Last Updated: