MicroStrategy REST API Example
This application demonstrates the functionalities of embedding dossier and report. You can also search reports by name. You can see the result in a list view. Report or Dossier will open when you click on it.
The main.js has the business logic for the application.
You start the application with the login.html, which has a simple login interface. You can change the URL to your MicroStrategy Library for testing.
The embeddinglib.js script at the top of the file must be changed to your environment. The dossier table will be populated with all dossiers present in the library of the environment. Clicking an entry will dynamically embed the dossier into the section below.
This page shows multiple reports which can be embedded into the page. Users can search reports by name. By clicking on a specific report in the search result table, the report will be dynamically embedded into the page.
fetch() method in API.js is to execute MicroStrategy REST API. The response json collected with the help of
json() method. Most of the methods in API.js return a Promise.
The following REST APIs are used in this project. For more information about MicroStrategy REST API, please visit the official documentation and play with the live API Explorer.
Authenticate a user - Login
Authenticate a user and create an HTTP session on the web server where the user’s MicroStrategy sessions are stored.
Get information about a configuration session.
Keep session alive
Extends the HTTP and intelligence Server sessions by resetting the timeouts.
Get the library
Get the library for the authenticated user.
Get Quick Search result in a list
Use the stored results of the Quick Search engine to return search results and display them as a list.
type: It is the type of objects to be searched, for example, 3 for report. Possible values are defined in EnumDSSObjectType
offset: It is the start point of your response. For example, if offset=2, it will return the report data beginning with the second record. The default value is 0.
limit: It is the max number of records to be returned. For example, if the limit is 500, it will return only 500 records of the report. The default value is 1000.