Using the IRIS Analytics Business Intelligence REST API
Did you know that you can get IRIS Analytics features as an REST API?
In this article I'll show some endpoints of IRIS Analytics Business Intelligence REST API, used in my project iris-analytics-notebook to create a pivot table component in Angular.
Getting all cubes in namespace
Method: POST Endpoint:
/api/deepsee/v1/:namespace/Info/Cubes
Example:
http://localhost:52773/api/deepsee/v1/myapp/Info/Cubes
Response example:
<iframe style="width:100%; height:200px;" src="//jsfiddle.net/jrpereirajr/74ep301q/15/embedded/result/" allowfullscreen="allowfullscreen" allowpaymentrequest frameborder="0"></iframe>
---
#### Getting all dimensions from a specified cube:
Method: POST
Endpoint:
```
/api/deepsee/v1/:namespace/Info/Filters/:cube
```
Example:
```
http://localhost:52773/api/deepsee/v1/myapp/Info/Filters/AsthmaPatients
```
Response example:
<iframe style="width:100%; height:300px;" src="//jsfiddle.net/jrpereirajr/74ep301q/17/embedded/result/" allowfullscreen="allowfullscreen" allowpaymentrequest frameborder="0"></iframe>
---
#### Getting all measures from a specified cube:
Method: POST
Endpoint:
```
/api/deepsee/v1/:namespace/Info/Measures/:cube
```
Example:
```
http://localhost:52773/api/deepsee/v1/myapp/Info/Measures/AsthmaPatients
```
Response example:
<iframe style="width:100%; height:300px;" src="//jsfiddle.net/jrpereirajr/74ep301q/19/embedded/result/" allowfullscreen="allowfullscreen" allowpaymentrequest frameborder="0"></iframe>
---
#### Getting all members from a specified dimension:
Method: POST
Endpoint:
```
/api/deepsee/v1/:namespace/Info/FilterMembers/:cube/:dimension
```
Example:
```
http://localhost:52773/api/deepsee/v1/myapp/Info/FilterMembers/AsthmaPatients/[AgeD].[H1].[Age Group]
```
Response example:
<iframe style="width:100%; height:300px;" src="//jsfiddle.net/jrpereirajr/74ep301q/20/embedded/result/" allowfullscreen="allowfullscreen" allowpaymentrequest frameborder="0"></iframe>
---
#### Executing a MDX query:
Method: POST
Endpoint:
```
/api/deepsee/v1/:namespace/Data/MDXExecute
```
Body:
```json
{
"MDX": "
<iframe style="width:100%; height:200px;" src="//jsfiddle.net/jrpereirajr/74ep301q/24/embedded/result/" allowfullscreen="allowfullscreen" allowpaymentrequest frameborder="0"></iframe>
---
Now, you can grab all raw data from server, you can use a lot of JavaScript libraries and/or frameworks to create riches UI. You can check out an example using Angular and Angular Material [here](https://openexchange.intersystems.com/package/iris-analytics-notebook).
Discussion (0)1