← Back to team overview

dhis2-devs team mailing list archive

Re: mydatamart and api

 

Just seen there is is AggregatedValueController.

On 22 May 2012 17:20, Bob Jolliffe <bobjolliffe@xxxxxxxxx> wrote:
> On 22 May 2012 17:06, Morten Olav Hansen <mortenoh@xxxxxxxxx> wrote:
>>> I'd like to shift this action into the web-api both because (i) using
>>> basic auth will be so much easier and (ii) that is probably where it
>>> should be anyway.  What do you think?
>>
>> I think it sounds like a good idea! (and another use-case for the web-api!)
>>
>>> The urls are not beautifully restful like some of the rest, but I am
>>> open to suggestion.  Currently they look something like eg:
>>>
>>> http://apps.dhis2.org/demo/dhis-web-reporting/exp/monthlyDataValues.action
>>> http://apps.dhis2.org/demo/dhis-web-reporting/exp/weeklyIndicatorValues.action
>>>
>>> with post parameters:
>>> "dataSourceLevel=4&dataSourceRoot=539&startDate=20110201&endDate=20120528"
>>>
>>> (note the use of internal ids for orgunits - currently we do not store
>>> uids in the local datamart)
>>
>> Would it be possible to use the dataValues part of the web-api? if we
>> extend it? or do you require very special meta-data? (will you be
>> using /api/metaData for that part?)
>
> No.  All that is being streamed is a gzipped csv file of aggregated
> datavalues or aggregated indicator values from the datamart.  I should
> check do we have any dataMart theme in our api .. I don't think we do
> (yet).
>
> So I guess if we were to think generally, we should think of different
> useful api methods for accessing (slices of) our datamart.  Currently
> I am happy to think quite primitively to just move the current actions
> across.  But with a placeholder for more refined ideas we can
> introduce later.  So I am thinking of something like a
> DataMartValueController for want of a better name.  And getting the
> actual data in exactly the same way I currently do - using a fairly
> finely tuned jdbc resultset iterator as these datamart dumps can get
> quite large.
>
> Bob
>
>>
>> --
>> Morten
>>
>>> Cheers
>>> Bob


References