Re: [Dhis2-devs] Best possible approach to list all the data elements of a program

2016-05-15 Thread chathura widanage
Hi Knut & Dr. Pamod, Thank you very much. You just solved multiple problems that I worried such as higher bandwidth usage, having to use multiple requests to fetch a single data, filtering etc. Thanks again. :) Chathura On 16 May 2016 01:52, "Pamod Amarakoon" wrote: > Hi

Re: [Dhis2-devs] Best possible approach to list all the data elements of a program

2016-05-15 Thread Pamod Amarakoon
Hi Chathura, I use the following nested web api code to retrieve data elements, attributes and option sets related to a program with registrations

Re: [Dhis2-devs] Best possible approach to list all the data elements of a program

2016-05-15 Thread Knut Staring
Hi Chathura, Yeah, it is pretty powerful. More examples in the documentation, also on filtering exactly which results and what fields you like to see. Have fun! Knut On Sun, May 15, 2016 at 7:17 PM, chathura widanage < chathurawidan...@gmail.com> wrote: > Hi Knut, > > This is really amazing.

Re: [Dhis2-devs] Best possible approach to list all the data elements of a program

2016-05-15 Thread chathura widanage
Hi Knut, This is really amazing. Didn't know that this kind of querying is possible with the API. Thank you very much. On Sun, May 15, 2016 at 10:40 PM, Knut Staring wrote: > Or better: > >

Re: [Dhis2-devs] Best possible approach to list all the data elements of a program

2016-05-15 Thread Knut Staring
Or better: https://play.dhis2.org/demo/api/programs/IpHINAT79UW.json?fields=programStages[programStageDataElements[dataElement[name,id]]] On Sun, May 15, 2016 at 7:09 PM, Knut Staring wrote: > Maybe something like this: > >

Re: [Dhis2-devs] Best possible approach to list all the data elements of a program

2016-05-15 Thread Knut Staring
Maybe something like this: https://play.dhis2.org/demo/api/programs/IpHINAT79UW.json?fields=programStages[programStageDataElements[:all]] On Sun, May 15, 2016 at 6:48 PM, chathura widanage < chathurawidan...@gmail.com> wrote: > Dear devs, > > What will be the best possible approach (minimum

[Dhis2-devs] Best possible approach to list all the data elements of a program

2016-05-15 Thread chathura widanage
Dear devs, What will be the best possible approach (minimum number of API calls) to get all the dataElements which are relevant for a selected program. I couldn't find out a direct API call for this, so currently following the below flow. Program (1) -> programStages (n) ->