JavaScript API Embed


JavaScript API is the option to create an embeddable JavaScript code from report and use the code snippet in other HTML applications to render the report.


  • Enter the embed name.
  • Select JavaScript API as the option.
  • Check Direct Output to produce reports with default values, if you wish to alter the values un-check the Direct Output option. This will re-direct you to the report submission page.
  • Click Save.
  • You will be redirected to the Embed Settings page.
  • Click Save. Go back to settings and click on Code Snippet.
  • Copy the URL.



  • Before the Embedding the code snippet in HTML page, include the splashbi.js file from SplashBI server to support loading of Chart/Object using JavaScript API, line of code to use in HTML page is given below.

  • Embed the JavaScript code snippet in Client Application HTML page, Example HTML code snippet is show below.


  • Paste the URL copied in clip board. The below image is displayed when direct output is not selected.



Security Options

OAUTH2



To know more about OAuth2 security creation refer OAuth2 Settings. Selecting this security option will enable a security wall that requires an OAuth2 security access for the user to view the report.


  • Embed the iFrame code snippet in Client Application HTML page, Example HTML code snippet is show below.


  • Paste the URL copied in clip board. The user will be redirected to the report.


NOTE: Selecting JavaScript will disable Login Form.