applies to: Indyco Explorer 1.56+


Dynamic views as Shared views offers a rappresentation of a subset of the conceptual model with the focus on the selected objects (measures and attributes), their relations and properties.


With the API you can integrate your BI tool with Indyco Explorer and have automatic and updated documentation for each report.



How build and display a dynamic view?


A dynamic views shows the selected objects with focus on their relations and properties. 


With Indyco you can easily build dynamic views using Indyco Explorer's API.


Indyco Explorer provides REST API for:

  • Build dynamic view;
  • Display dynamic view;
  • Delete dynamic view; 



Build dynamic view



API to build dynamic view has the following format:


<indyco-explorer-site-base>/api/dynamic/views


Ex. if the indyco explorer's url is http://indyco.com, you will use http://indyco.com/api/dynamic/views


The invocation of this API requires method POST and the following parameters:

  • content type: 'application/json';
  • data type: 'json';
  • data as JSON with the following format:

 

{
   "name":"<dynamic-view-name>",
   "description":"<dynamic-view-description>",
   "projectId":"<project-id>",
   "tags":[
      "<tag-1>",
      "<tag-2>",
      "<tag-3>"
   ],
   "persist":"<true/false>",
   "attributes":[
      {
         "hierarchy":"<hierarchy-name>",
         "name":"<attribute-name>",
         "<custom-property-name-1>":"<custom-property-value-1>",
         "<custom-property-name-2>":"<custom-property-value-2>"
      }
   ],
   "measures":[
      {
         "fact":"<fact-name>",
         "name":"<measure-name>",
         "<custom-property-name-1>":"<custom-property-value-1>",
         "<custom-property-name-2>":"<custom-property-value-2>"
      }
   ]
}
    


Each JSON field is described in the following table:


Field Details
name

it describes the dynamic view name

description
(optional)

it describes the dynamic view description

projectId

it is a constant, the project Id

tags
(optional)
it describes a list of categories
persist
(optional)
 If it is true, the api saves the dynamic view as shared view.
attributes Subset of attributes to focus
   
hierarchy it describes the hierarchy containing the attribute
name attribute name

It is possible to add custom properties to filter the selected attributes, each custom property should have the following format:

"custom-property-name": "custom-property-value"

measures Subset of measures to focus
   
fact it describes the fact containing the measure
name measure name

It is possible to add custom properties to filter the selected measures, each custom property should have the following format:

"custom-property-name": "custom-property-value"



This API returns the dynamic view's url. The url expires after 24 hours.


If the 'persist' field is set to true, the url returned is permanent and the view becomes a shared view.




Display dynamic view



After the generation of dynamic view, it is possible to get the data of a dynamic view calling an API with method GET and the following format:


<indyco-explorer-site-base>/api/dynamic/views/{viewId}

 

Ex. if the indyco explorer's url is http://indyco.com, you will use http://indyco.com/api/dynamic/views/<view-id>


{viewId} is the dynamic view id




Delete dynamic view 



It is possible to delete a dynamic view calling the following API with method DELETE:


<indyco-explorer-site-base>/api/dynamic/views/{viewId}

 

Ex. if the indyco explorer's url is http://indyco.com, you will use http://indyco.com/api/dynamic/views/<view-id>


{viewId} is the dynamic view id


In any cases a dynamic view expires after 24 hours from the generation