@@ -66,6 +66,7 @@ XData UrlMap
6666
6767 <!-- Get info about pivot -->
6868 <Route Url =" /DataSource" Method =" POST" Call =" GetDataSource" />
69+ <Route Url =" /DataSourceList" Method =" POST" Call =" GetListDataSources" />
6970
7071 <!-- Get info about pivot -->
7172 <Route Url =" /TermList" Method =" POST" Call =" GetTermList" />
@@ -132,6 +133,44 @@ ClassMethod Test() As %Status
132133 return $$$OK
133134}
134135
136+
137+ /// Get all data sources including "pivot", "kpi", "worksheets","metrics"
138+ ClassMethod GetListDataSources () As %Status
139+ {
140+
141+ if $$$R(" dataSource" ) = " pivot"
142+ {
143+ Set tSC = ##class (%DeepSee.Utils ).%GetPivotListArray (.tParms ,.pMetaData ,.pData )
144+
145+ }
146+ elseif $$$R(" dataSource" ) = " kpi"
147+ {
148+ Set tSC = ##class (%DeepSee.Utils ).%GetKPIListArray (.tParms ,.pMetaData ,.pData )
149+
150+ }
151+ elseif $$$R(" dataSource" ) = " worksheets"
152+ {
153+ Set tSC = ##class (%DeepSee.Utils ).%GetWorksheetListArray (.tParms ,.pMetaData ,.pData )
154+
155+ }
156+ elseif $$$R(" datasource" ) = " metrics"
157+ {
158+ Set tSC = ##class (%DeepSee.Utils ).%GetMetricListArray (.tParms ,.pMetaData ,.pData )
159+
160+ }
161+
162+ quit :$$$ISERR(tSC ) tSC
163+
164+ Set tSC = ##class (%DeepSee.REST.v1.DataServer ).%CreateObjectFromArray (.pData ,pMetaData ,.tSourceObj )
165+
166+ quit :$$$ISERR(tSC ) tSC
167+
168+ do tSourceObj .%ToJSON ()
169+
170+ quit tSC
171+ }
172+
173+
135174ClassMethod GetDataSource () As %Status
136175{
137176 return ##class (MDX2JSON.Utils ).GetDataSource ($$$R(" DataSource" ))
0 commit comments