← Back to team overview

dhis2-devs team mailing list archive

Re: How to Get user Favorite

 

GIS favorites at https://apps.dhis2.org/dev/api/maps.json which has one or
more *mapViews* (layers) as Knut mentioned.

If you want to get all information about e.g. a report table you can do

https://apps.dhis2.org/dev/api/reportTables/C0rhAq1oklh.json?fields=*,columns[*],rows[*],filters[*]

but you would normally want to transfer less information than that. More
info here:
https://www.dhis2.org/doc/snapshot/en/user/html/ch32s07.html


On Wed, Aug 6, 2014 at 10:52 AM, Knut Staring <knutst@xxxxxxxxx> wrote:

> Hi WHA,
>
> The API does not actually use the word "favorites", rather you have to
> look at the lists separately.
>
> So for Charts:
> https://apps.dhis2.org/api/charts.json
> <http://localhost:8082/api/charts.json>
>
> For Map layers:
> https://apps.dhis2.org/api/mapViews.json
> <http://localhost:8082/api/mapViews.json>
>
> For Pivot Tables (PT)
> https://apps.dhis2.org/demo/api/reportTables.json
>
> *Would appreciate if others could help out with the next stage, which I
> take to be that o*nce you have gotten the required parameters from the
> API,the actual data must be gotten from Analytics (i.e. a proper GET URL
> must be formed)
>
> You can see the format in the PT module by going to Download and copying
> the JSON link, e.g. like this:
> *https://apps.dhis2.org/demo/api/analytics.json?dimension=dx:fbfJHSPpUQD&dimension=pe:LAST_12_MONTHS&dimension=ou:ImspTQPwCqd
> <https://apps.dhis2.org/demo/api/analytics.json?dimension=dx:fbfJHSPpUQD&dimension=pe:LAST_12_MONTHS&dimension=ou:ImspTQPwCqd>*
>
>
>
>
>
> On Wed, Aug 6, 2014 at 9:33 AM, winhtaik aung <winhtaikaung28@xxxxxxxxxxx>
> wrote:
>
>> Hello dhis-devs
>>
>> Could you please tell me how to get user favourite data from WEB API?
>>
>> Regards
>> Win Htaik Aung(WHA)
>> Contact on Skype winhtaikaung28
>>
>>
>
>
> --
> Knut Staring
> Dept. of Informatics, University of Oslo
> +4791880522
> http://dhis2.org
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>

References