An API to assist developers in integrating AI/BI dashboards into their applications (AWS, Azure, GCP).
const dashboard = new DatabricksDashboard({
workspaceId: '1234567890123456',
instanceUrl: 'https://my-databricks-instance.com',
container: document.getElementById('dashboard-container'),
dashboardId: 'abcdedf123456',
token: tokenThatCanBeSeenByViewers,
});
dashboard.initialize();
To support long-running dashboard, you can pass a getNewToken
function that automatically refreshes the token before it expires. Note that this approach will not work in scenarios where the token is exchanged with the Identity Provider (IdP). These scenarios require direct user action to re-mint the token, which is not supported. However, for use cases where the token is minted using a service principal, renewal should be straightforward to implement.
const dashboard = new DatabricksDashboard({
// ...other required options
getNewToken: async () => {
// Return a string literal token value to the API
},
});
You can configure the embedded dashboard’s color scheme using the colorScheme
option.
The colorScheme
option maps to the CSS color-scheme
property, which allows the embedded dashboard to respect or override the user’s light or dark preference.
const dashboard = new DatabricksDashboard({
// ...other required options
colorScheme: 'light dark', // or "light", or "dark"
});