Search results

Embedding Bold BI Dashboards in PHP using the Embedded SDK

Created a PHP 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 PHP Core sample from provided link.

  2. In Index.php, you must set your server details to EmbedProperties as follows.
    Embed Properties

  3. In AuthorizeServer.php, you must set UserEmail and Embed Secret key, which has been used for creating embed signature to get authorize the server from PHP sample. Learn more about authorize server here.

    Authorize Server

  4. Set the following properties in both files.

    ServerUrl Dashboard Server BI URL Enterprise Edition- http://localhost:5000/bi/site/site1 Cloud -http://dashboard.syncfusion.com/bi
    DashboardPath Set the dashboard path by category name following by dashboard name. Ex: /Sales/Sales Performance
    AuthorizeServerURL URL pointing to AuthorizeServer API file. We have running PHP sample in 8080 port. Ex: http://localhost:8080/rest/authorizeserver.php
    UserEmail UserEmail of the Admin in your Bold BI, which will be used to access the widgets of the dashboard.
    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. You can render the dashboard by passing the Dashboard path or Dashboard id.

    dashboard path

  3. Then, run your PHP Core sample.

How this sample works

  1. When you embed a dashboard to render, you will authorize the server URL by calling the GetEmbedDetails function by API call with provided EmbedProperties values.

    Getdetails

  2. In above authorization, generated the SignatureUrl with the provided EmbedSecret key and validate the embed details in Bold BI. Then only the embedded widget will be rendered in Index.php.

  3. In Index.php, we have initialized the dashboard from the Sales Performance. You can change the dashboard path according to the dashboard you wish to embed.

    Embed Properties