Search results

Embedding Bold BI Dashboards in Django using the Embedded SDK

Created a Django application for achieving this embedding. Here, set the server and dashboard details as the embed details, and the dashboard will be rendered after passing the authorization.

NOTE: Reading the Getting Started section of the documentation is the best way to get started. The Getting Started guide provides you enough information that you need to know before working on the sample.

How to run the sample

  1. Please download the Django sample from the attached file.

  2. You need to set the following properties in file as follows.
    Embed Properties

    RootUrl Dashboard Server BI URL (ex: http://localhost:5000/bi,
    SiteIdentifier For Bold BI Enterprise edition, it should be like site/site1. For Bold BI Cloud, it should be empty string.
    DashboardId Provide the dashboard id of the dashboard that you want to embed here. Please refer the following for getting the dashboard id.
    UserEmail UserEmail of the Admin in your Bold BI, which will be used to get the dashboards list.
    EmbedSecret You can get your EmbedSecret key from embed tab by enablingEnable embedauthentication in Administration page as mentioned in next step.
  1. You can get your Embed Secret key from the administrator setting section. Please refer to this link, for more details.

  2. Then, run your Django application.

Get dashboard ID

Click dashboard name in the dashboard list page. Clicked dashboards are opened in new window. In that window, you can get the dashboard id in URL link as shown in the following image.

Get dashboard ID

After changing the above details in the sample, you can run the Django and the dashboard will be rendered.

How this sample works

  1. Based on the provided embed details with dashboardId, you would authorize the server URL by calling the getembeddetails function ( call with provided EmbedProperties values. Learn more about authorize server here Authorize Server URL Get Embed Details

NOTE: Remove the CSRF Token from the headers, if your application does not have CSRF middleware (django.middleware.csrf.CsrfViewMiddleware). CSRF Token

  1. In the above authorization, generated the SignatureUrl using the provided EmbedSecret key and validate embed details in Bold BI. Once details are validated, the dashboard starts to render.

  2. In the, you can change the dashboard Id of the respective dashboard that you want to embed. Set Dashboard Id