We have created a simple Node.js sample for achieving this embedding. Here, we could set the sever and dashboard details as the embed details then the dashboard would be rendered after passing the authorization.
NOTE: The best way to get started would be reading the Getting Started section of the documentation to start using first. The Getting Started guide gives you enough information that you need to know before working on the sample.
Please download the Node.js App from here.
You need to set your embed property details in the Index.html
and Embed.js
.
ServerUrl | Dashboard Server BI URL, which is running on localhost:8080 port and URL made by appending rootUrl with siteIdentifier.(ex: http://localhost:5000/bi/site/site1, http://demo.boldbi.com/bi/site/site1) |
DashboardId | Get and set the item id of the dashboard to embed from BI server. |
Environment | Your Bold BI application environment. (If Cloud, you should use `cloud`, if Enterprise, you should use `onpremise`) |
AuthorizationServer | URL pointing to AuthorizeServer API file. We are running Node.js sample in 8080 port(http://localhost:8080/embeddetail/get). Learn more about authorize server [here](/embedded-bi/javascript-based/authorize-server/) |
EmbedSecret | You could get your EmbedSecret key from Embed tab by enabling `Enable embed authentication` in Administration page as mentioned in next step |
UserEmail | UserEmail of the Admin in your Bold BI, which would be used to authorize the server |
You could get the item id of the dashboard from the BI server. Please refer to this link and the following screenshot.
You can get your Embed Secret key from the administrator setting section. Please refer to this link for more details.
Then, run your Node.js sample.
Based on the dashboardId provided in the index.html
file, we would authorize the server URL by calling the GetEmbedDetails API(http://localhost:8080/embeddetail/get) call with the provided EmbedProperties values.
In the above authorization, we have generated the SignatureUrl with the provided EmbedSecret key and validate embed details in Bold BI. Once the details are validated, the dashboard starts to render in index.html
.
In Index.html
, you can change the dashboard Id of the respective dashboard as you wish to embed.