Search results

Embedding with Token Authentication

Dashboard Embedding with Token Authentication

Bold BI supports embedding the dashboard with iFrame using token-based authentication.

Create the embed URL to View Dashboard

The embed URL should be in the following format.

{dashboard URL}/{embed parameters}&embed_signature={signature}

Please find the details of the parameter in the URL as follows:

Parameter Description
dashboard URL URL of the dashboard to be embed. Please refer to the Get links to Dashboards.
Example:
https://test.boldbi.com/bi/en-us/site/site1/dashboards/8428c9d9-85db-418c-b877-ea4495dcddd7/Predictive%20Analytics/Personal%20Expense%20Analysis

embed parameters Mandatory Parameters to embed the dashboard with token based authentication.
embed_nonce Random GUID string that restricts the URL reconstruction or attacks from the hackers. 3e253410-1a82-4fb3-a337-122a8007dafc
embed_user_email User email id. [email protected]
Example:
embedParameter="embed_nonce=3e253410-1a82-4fb3-a337-122a8007dafc&[email protected]"

embed signature This embed signature is generated by encrypting the above embedParameters query string using the `HMACSHA256` algorithm.
Note:Embed signature is different from Embed Secret key. Both are not same.
Example:
embed_signature=VYrDMVX4h85PrRBKX9mystRHYkU8z+HVC9bkVMc2qGY=

The following embed URL is the formation of the dashboard URL, embed parameters, and embed signature

Example: https://test.boldbi.com/bi/en-us/site/site1/dashboards/8428c9d9-85db-418c-b877-ea4495dcddd7/Predictive%20Analytics/Personal%20Expense%20Analysis?embed_nonce=3e253410-1a82-4fb3-a337-122a8007dafc&embed_user_email=admin@domain.com&embed_signature=VYrDMVX4h85PrRBKX9mystRHYkU8z+HVC9bkVMc2qGY=

NOTE: By default, the generated Iframe signature URL is valid for an indefinite amount of period. In mean time, you can secure your Iframe URL with allowed domains and IP addresses support. Please refer to the Secured Embedding for more.

NOTE: If you want to enable the validation and expiration for generated URL, you can set the embed_timestamp and embed_expirationtime parameters.

Optional Embed Parameters

Please find the optional dashboard embed parameter specifications below. Here you may find EmbedProperties for the dashboard.

Parameter Description Example
embed_timestamp A UNIX timestamp of the current time. This is used to verify that the embed URL was established within the last 6 days.
double unixTimestamp = (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds.
1583934776
embed_expirationtime Decide how long the token will remain active than default 6 days. It has to be portrayed in seconds. The time ranges from 86400 seconds (one day) to 518400 seconds (six days). If you want to set embed_expirationtime, you must set the embed_timestamp too in the URL generation. 518400
views This value makes you to check the views in the embedded dashboard. The default value is false. To show the view icon from the toolbar, you can set the value of the views parameter to true. The old parameter name embed_dashboard_views will be supported up to version 11.3. true
embed_dashboard_views_edit This value allows you to perform the actions such as save view, update view, and delete views in the embedded dashboard. The default value is false. To show the Save and SaveAs icon in the filter overview, you can set the value of the embed_dashboard_views_edit parameter to true. true
export The export option to various formats of the dashboard and widget in embedded dashboard is displayed based on this value. The default value is false. To show the export icon from the toolbar, you can set the value of the export parameter to true. The old parameter name embed_dashboard_export will be supported up to version 11.3. true
dashboard_comments The actions related to comments such as post, edit, delete, reply, watch, un-watch, posting the image, and user mention list options can be performed in the dashboard based on this value. The default value is false. To show the dashboard comments icon from the toolbar, you can set the value of the dashboard_comments parameter to true. The old parameter name embed_dashboard_comments will be supported up to version 11.3. true
widget_comments The actions related to comments such as post, edit, delete, reply, watch, un-watch, posting the image, and user mention list options can be performed in the dashboard based on this value. The default value is false. To show the widget comments icon, you can set the value of the widget_comments parameter to true. The old parameter name embed_widget_comments will be supported up to version 11.3. true
hide_dashboard_edit Show/hide the dashboard edit icon. By default the icon will be shown only if user has the permission to edit the specific dashboard otherwise it doesn't shown. false
hide_preview_as Show preview as option in the dashboard designer with the default value set to false. To hide the preview as option, you can set the value of the hide_preview_as parameter to true. false
enable_ai_assistant Show/hide the AI Assistant icon. By default, the icon is not displayed, and the value is false. To enable the AI Assistant icon, you can set the value of the enable_ai_assistant parameter to true. true
enable_ai_summary This value allows you to show the AI summary icons in the dashboard and widget. To hide specific dashboard summary or widget summary icons, you can set the value for the "enable_ai_summary" parameter with predefined values given below.
Note: To enable this, it is mandatory to use the "enable_ai_assistant" parameter.

Note: Predefined values: ds-Dashboard Summary,ws-Widget Summary

string.
Example:
enable_ai_summary= "ds,ws".

hide_aidata_usage This value allows you to show the AI Data Usage icon in the AI Assistant window. The default value is false. To hide the data usage option, you can set the value of the hide_aidata_usage parameter to true.
Note: To enable this, it is mandatory to use the enable_ai_assistant parameter.
false
customize_ai_name Allows customizing the title of the AI Copilot.
Note: This parameter requires enable_ai_assistant to be set to true.
string.
Example:
customize_ai_name= "custom name"

embed_dashboard_favorite We have option to mark the dashboard as favorite. The default value is true and icon would show. To disable or hide the dashboard favorite icon from the toolbar, you can set the value of the embed_dashboard_favorite parameter to false. true
hide_header This value allows you to show the dashboard header. The default value is false. To hide the header of the dashboard, you can set the value of the hide_header parameter to true. false
hide_metrics This value allows you to show the metrics option in the dashboard banner. The default value is false. To hide the metrics option, you can set the value of the hide_metrics parameter to true. false
hide_tool This value allows you to show the dashboard icons in the toolbar. To hide specific dashboard icons from the toolbar, you can set the value for the "hide_tool" parameter with predefined values that corresponds to each icon in the toolbar.

Note: Predefined values: dp-Dashboard Parameter,fo-Filter Overview,fs-FullScreen,rf-Refresh,om-Option Menu,sh-Schedule

string.
Example:
hide_tool= "dp,fo,fs,rf,om,sh".

embed_datasource_filter The embedded dashboard can be filtered with passed Dashboard Parameter and URL Parameter. `If you would like to pass Dashboard Parameter - embed_datasource_filter=&&DashboardParameter1=Value1`
`If you would like to pass URL Parameter - embed_datasource_filter=&URLParameter2=Value2`
`If you would like to pass both Dashboard and URL parameter - embed_datasource_filter=&&DashboardParameter1=Value1&URLParameter2=Value2`
restrict_mobile_view Users can view the dashboard in mobile view after reaching a specified pixel threshold on the desktop when the browser is resized, with the default value set to false. To restrict the mobile view, you can set the value of the restrict_mobile_view parameter to true. true
hide_language_dropdown Show the dashboard localization dropdown in the dashboard banner, with the default value set to false. To hide the dropdown, set the value of the hide_language_dropdown parameter to true.
Note: Before setting the dashboard localization at the embedding level, you should configure the Localize Dashboard option in the dashboard designer of your Bold BI Server.
true
language_code This parameter allows to apply the localization during the initial rendering of the dashboard. Some language code values include:
fr-FR=French(France),
ar-AE=Arabic(U.A.E)
Note: Before setting the dashboard localization at the embedding level, you should configure the Localize Dashboard option in the dashboard designer of your Bold BI Server.
string.

Example:

language_code=fr-FR

Sample application for Dashboard Embedding with Token Authentication

Please get the Dashboard Embedding with Token Authentication sample from GitHub.

Generating the embed signature for the embed URL

Embed parameters and the Embed Secret Key are mandatory parameters used for generating the Embed Signature

We have provided the code sample to generate the signature in C#. You can write the equivalent code in your platform language.

    var embedParameters = "embed_nonce=55a1c8f4-5015-487d-8463-d3ebeae655fd&[email protected]";
    var embedSecretKey = "7tFaq2zidmxJN8Pid6IUAiGFqAUwMfK"; ///site-administration/embed-settings/#get-embed-secret-code

    public string GetSignatureUrl(string embedParameters, string embedSecretKey)
    {
       var encoding = new System.Text.UTF8Encoding();
       var keyBytes = encoding.GetBytes(embedSecretKey);
       var messageBytes = encoding.GetBytes(embedParameters);
       using (var hmacsha = new HMACSHA256(keyBytes))
       {
        var embedSignature = hmacsha.ComputeHash(messageBytes);
        return Convert.ToBase64String(embedSignature);
        // For eg, embedSignature = VYrDMVX4h85PrRBKX9mystRHYkU8z+HVC9bkVMc2qGY=
       }
    }

Embed Signature refers to a hashed value that is generated for authentication purposes in an embed request sent to the Bold BI server. To obtain the embedSignature, the embedParameters (contains dashboardid, user email and other parameters) and embedSecretKey are passed as arguments to the GetSignatureUrl method. This method generates the hashed signature using the HMACSHA256 algorithm, which should be appended to the existing iframe URL as a query parameter named ‘embed_signature’.

Generating the embed signature for view dashboard Using Bold BI UI

  1. To obtain the embed URL, click on the context menu of the corresponding dashboard and select the option Get Embed code.
    EmbedCodeOption

  2. Enable Embed signature button and Choose the mode value as View to render a dashboard in View mode.

    ModeOption

  3. By default, some options in the dashboard banner are disabled. To enable these options, simply click the button provided in the embed dialog.

    EnableOption

  4. Please copy the embed URL by clicking the copy icon in the Embed Code dialog. CopyEmbedCode

  5. Please embed the copied URL into other web applications.

NOTE: Applying filters support is not provided UI level. For this Please sample application. Please refer this link to know more.

Create the embed URL to Edit Dashboard

The embed URL should be in the following format.

{dashboard edit URL}/{embed parameters}&embed_signature={signature}

Please find the details of the parameter in the URL as follows.

Parameter Description
dashboard edit URL URL of the editable dashboard. Open the dashboard in edit mode to obtain the dashboard designer URL. Copy the URL to embed the specific dashboard once it has been opened on the designer page.
Example:
https://test.boldbi.com/bi/en-us/site/site1/dashboard-designer/8428c9d9-85db-418c-b877-ea4495dcddd7/Predictive%20Analytics/Personal%20Expense%20Analysis

embed parameters Mandatory Parameters to embed the dashboard in design mode with token based authentication.
embed_nonce Random GUID string that restricts the URL reconstruction or attacks from the hackers. 3e253410-1a82-4fb3-a337-122a8007dafc
embed_user_email User email id. [email protected]
Example:
embedParameter="embed_nonce=3e253410-1a82-4fb3-a337-122a8007dafc&[email protected]"

embed signature This embed signature is generated by encrypting the above embedParameters query string using the `HMACSHA256` algorithm.
Note:Embed signature is different from Embed Secret key. Both are not same.
Example:
embed_signature=VYrDMVX4h85PrRBKX9mystRHYkU8z+HVC9bkVMc2qGY=

The following embed URL is the formation of the dashboard edit URL, embed parameters, and embed signature.

Example: https://test.boldbi.com/bi/en-us/site/site1/dashboard-designer/8428c9d9-85db-418c-b877-ea4495dcddd7/Predictive%20Analytics/Personal%20Expense%20Analysis?embed_nonce=3e253410-1a82-4fb3-a337-122a8007dafc&embed_user_email=admin@domain.com&embed_signature=VYrDMVX4h85PrRBKX9mystRHYkU8z+HVC9bkVMc2qGY=

Generating the embed signature for designer dashboard Using Bold BI UI

  1. To obtain the embed URL, click on the context menu of the corresponding dashboard and select the option Get Embed code.
    EmbedCodeOption

  2. Enable Embed signature button and Choose the mode value as Edit to render a dashboard in Edit mode. ModeOption

  3. By default, some options in the dashboard banner are disabled. To enable these options, simply click the button provided in the embed dialog.

    EnableOption

  4. Please copy the embed URL by clicking the copy icon in the Embed Code dialog. CopyEmbedCode

  5. Please embed the copied URL into other web applications.

Create the embed URL to Create Dashboard

The embed URL should be in the following format.

{create dashboard URL}/{embed parameters}&embed_signature={signature}

Please find the details of the parameter in the URL as follows.

Parameter Description
create dashboard URL URL to create a new dashboard.
Example:
https://test.boldbi.com/bi/en-us/site/site1/dashboard-designer

embed parameters Mandatory Parameters to embed the dashboard in create mode with token based authentication.
embed_nonce Random GUID string that restricts the URL reconstruction or attacks from the hackers. 3e253410-1a82-4fb3-a337-122a8007dafc
embed_user_email User email id. [email protected]
Example:
embedParameter="embed_nonce=3e253410-1a82-4fb3-a337-122a8007dafc&[email protected]"

embed signature This embed signature is generated by encrypting the above embedParameters query string using the `HMACSHA256` algorithm.
Note:Embed signature is different from Embed Secret key. Both are not same.
Example:
embed_signature=VYrDMVX4h85PrRBKX9mystRHYkU8z+HVC9bkVMc2qGY=

The following embed URL is the formation of the create dashboard URL, embed parameters, and embed signature.

Example: https://test.boldbi.com/bi/en-us/site/site1/dashboard-designer?embed_nonce=3e253410-1a82-4fb3-a337-122a8007dafc&embed_user_email=admin@domain.com&embed_signature=VYrDMVX4h85PrRBKX9mystRHYkU8z+HVC9bkVMc2qGY='

How to enable token validity and expiration time in embed URL

The embed_timestamp parameter is used to set token validity. The value is the UNIX timestamp of the current time(embed_timestamp=1583928213). If you set this, the generated iframe URL is valid only for 6 days. For more detail please check the above Optional Parameter section.

This example illustrates about generating the URL with 6 days validity, after that period the URL wouldn't be work: https://test.boldbi.com/bi/en-us/site/site1/dashboards/8428c9d9-85db-418c-b877-ea4495dcddd7/Predictive%20Analytics/Personal%20Expense%20Analysis?embed_nonce=3e253410-1a82-4fb3-a337-122a8007dafc&embed_user_email=admin@domain.com&embed_timestamp=1583928213&embed_signature=VYrDMVX4h85PrRBKX9mystRHYkU8z+HVC9bkVMc2qGY=

The embed_expirationtime is used to set the expiration time of the iframe signature URL. If needed, can expire the URL within the token validity period of 6 days. It has to be declared in seconds(embed_timestamp=1583928213&embed_expirationtime=86400) but not greater than value of 518400 seconds which represent token validity as 6 days. For more detail please check the above Optional Parameter section.

This example illustrates about generating the URL with expiration time. Here I have set 1 day as expiration in seconds, after that period the URL would be expired and won't work: https://test.boldbi.com/bi/en-us/site/site1/dashboards/8428c9d9-85db-418c-b877-ea4495dcddd7/Predictive%20Analytics/Personal%20Expense%20Analysis?embed_nonce=3e253410-1a82-4fb3-a337-122a8007dafc&embed_user_email=admin@domain.com&embed_timestamp=1583928213&embed_expirationtime=86400&embed_signature=VYrDMVX4h85PrRBKX9mystRHYkU8z+HVC9bkVMc2qGY=

How to pass the dashboard parameter and URL parameter filters in embed URL

In the embed URL, you can simultaneously pass values for both types of filters (Dashboard Parameter/URL Filter Parameter).

Pass your filters to the embed_datasource_filter=&&dashboardparameter1=value1&urlparameter1=value1 URL parameter in the embed URL as follows.

Example: https://test.boldbi.com/bi/en-us/site/site1/dashboards/8428c9d9-85db-418c-b877-ea4495dcddd7/Predictive%20Analytics/Personal%20Expense%20Analysis?embed_nonce=3e253410-1a82-4fb3-a337-122a8007dafc&embed_user_email=admin@domain.com&embed_datasource_filter=&&dashboardparameter1=value1&urlparameter1=value1&embed_signature=VYrDMVX4h85PrRBKX9mystRHYkU8z+HVC9bkVMc2qGY=
  • In the embed URL, the dashboard parameter filter must be started with a double ampersand &&. For more details, Refer to the configuring dashboard parameters.

  • In the embed URL, the URL filter parameter must be started with a single ampersand &. For more details, please refer to the URL Filter.

Embed data source with token in Bold BI

Bold BI supports embedding the data source into other web applications using Token authentication.

Creating the embed URL to create data source

The embed URL should be in the following format; to get create datasource URl, Please refer the Get Data source URL.

{create datasource URL}/{embed parameters}&embed_signature={signature}

Example: http://test.boldbi.com/bi/en-us/site/site1/datasource-designer/connection?embed_nonce=3e253410-1a82-4fb3-a337-122a8007dafc&embed_user_email=test@syncfusion.com&embeds=sdwd&embed_timestamp=1583928213&embed_signature=VYrDMVX4h85PrRBKX9mystRHYkU8z+HVC9bkVMc2qGY='

Please find the details of the parameter in the URL as follows.

Parameter Description
create datasource URL URL of the data source to establish a new connection. To know more, click the Get Data source URL.
embed parameters Parameters required to embed the data source with Token.
signature The authorized key for the data source to be embedded in create mode.

Creating the embed URL to edit data source

The embed URL should be in the following format; to get edit datasource URL, please refer the Get Data source URL.

{edit datasource URL}/{embed parameters}&embed_signature={signature}

Example: http://test.boldbi.com/bi/en-us/site/site1/datasource-designer/8428c9d9-85db-418c-b877-ea4495dcddd7/Personal%20Expense%20Analysis?embed_nonce=3e253410-1a82-4fb3-a337-122a8007dafc&embed_user_email=test@syncfusion.com&embeds=sdwd&embed_timestamp=1583928213&embed_signature=VYrDMVX4h85PrRBKX9mystRHYkU8z+HVC9bkVMc2qGY='

Please find the details of the parameter in the URL as follows.

Parameter Description
edit datasource URL URL of the data source to be embedded. To know more, click theGet Data source URL.
embed parameters Parameters required to embed the data source with Token.
signature The authorized key for the data source to be embedded in design mode.

Generating the embed signature for edit data source Using Bold BI UI

  1. To obtain the embed URL, click on the context menu of the corresponding datasource and select the option Get Embed code. EmbedCodeOption

  2. Enable Embed signature button and copy the embed URL by clicking the copy icon in the Embed Code dialog. ModeOption

  3. Please embed the copied URL into other web applications.

Widget Embedding with Token Authentication

Bold BI supports embedding widgets with iFrame using token-based authentication.

How to get the Embed Widget Url

  1. Open the desired dashboard and select the More option under the widget you want to embed .Then, select Get Embed Code from the drop-down menu. InspectElement

  2. Copy the iframe code from the embed code pop-up page. InspectElement

Create the embed URL to View Dashboard

The embed URL should be in the following format.

{dashboard URL}/{embed parameters}&embed_signature={signature}

Please find the details of the parameter in the URL below.

Parameter Description
dashboard URL URL of the dashboard widget to be embed. Please refer to the Widget Embedding to get the URL.
Example:
https://test.boldbi.com/bi/en-us/site/site1/dashboards/8428c9d9-85db-418c-b877-ea4495dcddd7/Predictive%20Analytics/Personal%20Expense%20Analysis?isWidgetMode=true&widgetId=0000aeab-3359-40c6-b014-1ea98e9a7ce9&

embed parameters Mandatory Parameters to embed the widget with token based authentication.
embed_nonce Random GUID string that restricts the URL reconstruction or attacks from the hackers. 3e253410-1a82-4fb3-a337-122a8007dafc
embed_user_email User email id. [email protected]
Example:
embedParameter="embed_nonce=3e253410-1a82-4fb3-a337-122a8007dafc&[email protected]"

embed signature This embed signature is generated by encrypting the above embedParameters query string using the `HMACSHA256` algorithm.
Note:Embed signature is different from the Embed Secret key. Both are not same.
Example:
embed_signature=VYrDMVX4h85PrRBKX9mystRHYkU8z+HVC9bkVMc2qGY=

The following embed URL is the formation of the dashboard URL, embed parameters, and embed signature

Example: https://test.boldbi.com/bi/en-us/site/site1/dashboards/8428c9d9-85db-418c-b877-ea4495dcddd7/Predictive%20Analytics/Personal%20Expense%20Analysis?isWidgetMode=true&widgetId=0000aeab-3359-40c6-b014-1ea98e9a7ce9&embed_nonce=3e253410-1a82-4fb3-a337-122a8007dafc&embed_user_email=admin@domain.com&embed_signature=VYrDMVX4h85PrRBKX9mystRHYkU8z+HVC9bkVMc2qGY=

NOTE: The generated iframe signature URL is valid indefinitely because the embed_timestamp and embed_expirationtime parameters are optional. If you want to set the default validity period of 6 days for the generated iframe URL, use the embed_timestamp.

Optional Embed Parameters

Please find the optional widget in the embed parameter specifications below. Here, you may find the EmbedProperties for the dashboard.

Parameter Description Example
embed_timestamp A UNIX timestamp of the current time. This is used to verify that the embed URL was established within the last 6 days.
double unixTimestamp = (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds.
1583934776
embed_expirationtime Decide how long the token will remain active than default 6 days. It has to be portrayed in seconds. The time ranges from 86400 seconds (one day) to 518400 seconds (six days). If you want to set embed_expirationtime, you must set the embed_timestamp too in the URL generation. 518400
isWidgetMode To enable the widget mode. true
widgetId Widget Id of the dashboard widget to be embedded. To know how to get widgetId from the dashboard, refer to theWidget Embedding 0000aeab-3359-40c6-b014-1ea98e9a7ce9
embed_dashboard_export The export option to various formats of the dashboard and widget in the embedded dashboard is displayed based on this value. The default value is false. To show the export icon from the toolbar, you can set the value of the embed_dashboard_export parameter to true. true
embed_widget_comments The actions related to comments such as post, edit, delete, reply, posting the image, and user mention list options, can be performed in widgets based on this value. The default value is false. To show the widget comments icon, you can set the value of the embed_widget_comments parameter to true. true
hide_widget_tool This value allows you to show the widget icons in the widget header. To hide specific widget icons from the widget header, you can set the value for the hide_widget_tool parameter with predefined values that correspond to each icon in the widget header.

Note: Predefined values: fr-Filter,fs-FullScreen,om-Option Menu

string.
Example:
hide_widget_tool= "fr,fs,om".

Sample application for Widget Embedding with Token Authentication

Please get the Widget Embedding with Token Authentication sample from GitHub.

Dashboard Embedding with views using Token Authentication

A dashboard can be embedded with views using Token Authentication.

To achieve this, you will need an embed code with views, an embed secret code, and an embed signature. In order to embed the dashboard with views using embed signature, you will need an embed URL with a view ID. Follow the steps below to obtain the embed code,

  • To obtain the embed URL, click on the Views icon that is highlighted below.

EmbedViews-ViewsIcon

  • Then click on the Link icon of the saved views. Here, you will get the dashboard URL with view id.

EmbedViews-LinkIcon

Then, follow the steps below to obtain the embed secret code and learn about the parameters needed to create the embed signature.

Using the sample, you can embed the dashboard with views using SSO.