Version 2020
Introduction to the Embedding SDK
The Embedding SDK allows you to quickly integrate a MicroStrategy dossier into a web application in a responsive manner. It also provides resources to add functionality such as controlling navigation, retrieving and applying filters, setting properties, and managing events, and supports several different authentication environments.
There are three basic steps for embedding a dossier.
-
In the initial page of your web application, add a link to the MicroStrategy JavaScript Embedding API library.
<script src="http://{host}:{port}/{Library}/javascript/embeddinglib.js"></script>
-
Create a <div> as the placeholder where you want to embed the dossier.
<div id="dossierContainer"></div>
-
Call the microstrategy.dossier.create(props) method when the application has finished loading.
var placeholderDiv = document.getElementById("dossierContainer"); microstrategy.dossier.create({ placeholder: placeholderDiv, url: http: //{host}:{port}/{Library}/app/{ProjectID}/{DossierID} });
To help you get started, we have provided a number of simple applications with sample code and explanations.
-
Support for Different Authentication Environments
Samples that display an embedded dossier in different authentication environments
-
Samples that add functionality, such as controlling navigation, retrieving and applying filters, setting properties, and managing events like page changes
-
Workflow to Use REST APIs and the Embedding API
Sample workflow using REST APIs to authenticate and search for documents in a specific folder, and then use the JavaScript Embedding API to embed a document selected from the search results
If the application server is different from the server running the MicroStrategyLibrary application, you may need to perform additional configuration to support Cross-Origin Requests (CORS).
To see changes to the Embedding SDK in the current release, refer to What's New.
To maintain your current customizations and take advantage of new features, refer to Upgrading to a newer version of MicroStrategy.
For earlier versions of the Embedding SDK, refer to Previous Releases.