rest-api-samples/data-api/beginner-tutorial at main · MicroStrategy/rest-api-samples · GitHub
Skip to content

Latest commit

 

History

History

Folders and files

README.md

Tutorial common workflow for MicroStrategy Data API

Overview

Here we will introduce a common workflow for MicroStrategy Data API, and we provide different implementations for this workflow, currently, we support Java, NodeJS and curl implementations.

MicroStrategy Data API common workflow

  1. Logging in: Authenticate a user
  2. Publishing cube(optional): If cube is not republished, this part can be applied to publish an cube
  3. Retrieving cube definition: cube definition includes attribute and metrics info in the cube
  4. Retrieving cube raw data: different body parameter with different behavior, the body will include requestObjects, sorting, viewFilter, metricLimits json data.
  5. Retrieving cube data with existing instanceId: Get the results of a previously created instance of cube.
  6. Logging out: Close all existing sessions for the authenticated user

MicroStrategy sample information

We will use the sample cube “Intelligent Cube - Drilling outside the cube is disabled” to implement common workflow in following steps, details as below:

Different code implementation(Getting Started)

Tree raw cube/report json data Transformation

Since raw json data from response of the endpoints POST /cubes/{cubeId}/instances, POST /reports/{reportId}/instances, GET /cubes/{cubeId}/instances/{instanceId} and GET /reports/{reportId}/instances/{instanceId} are tree json, it is not intuitive to show, so we provide tree data transformation code with Java and Javascript implementations, code links as below: