Once an embed authorization token has been generated on the server side, utilize it on the frontend to render a dashboard.
You can install the Bold BI Embedded SDK in the two ways:
To install the SDK, use the npm package manager by executing the command below in your command-line interface. Using npm is advised as it allows convenient access to the latest SDK updates when they are released.
npm i -save @boldbi/boldbi-embedded-sdk
Then, import the SDK into your application:
import {BoldBI} from '@boldbi/boldbi-embedded-sdk';
Note: The SDK uses ECMAScript 6 syntax and exports
BoldBI
as a named (non-default) export.
If your application does not rely on npm or a comparable JavaScript package manager, you may include our minified JavaScript file in any HTML document by utilizing the code provided below:
<script type="text/javascript" src="https://cdn.boldbi.com/embedded-sdk/v13.1.10/boldbi-embed.js"></script>
In this step, we will utilize the Embed token generated on the server side to securely integrate a dashboard into your frontend application using the embed SDK.
Insert a div
element with a distinct ID to act as the dashboard container. Then initialize the Bold BI instance and invoke it. This approach guarantees secure dashboard loading tailored to individual user access.
<div id="dashboard_container_id"></div>
<script>
var boldbiEmbedInstance = BoldBI.create({
serverUrl: "< Bold BI Server URL >",
dashboardId: "< Dashboard Id >",
embedContainerId: "< Embed Container Id >", // ID of the div where dashboard will render
embedToken: "< Embed token generated from server end >"
});
boldbiEmbedInstance.loadDashboard();
</script>
Property | Type | Description |
---|---|---|
serverUrl | string | Use your Bold BI Server URL (e.g., http://localhost:[portno]/bi/site/site1) |
dashboardId | string | Set the item ID of the dashboard you want to embed. |
embedContainerId | string | Use the Id of the div element where the dashboard will render. |
embedToken | string | Utilize the Embed Token which is created in the backend. |
Note: For more features on the dashboard with additional members, methods, and events, refer to the Dashboard Component Reference.