API call to list all data elements within a dataset

Hi everyone,

Can someone share with me the API call to list all data elements within a dataset, perhaps the uid and name? Though if someone has something already that provides more fields that would also be great.

Thanks,

Nick

We would be also very happy of being able to do this, adding description field.

Lise.

···

From: Dhis2-users [mailto:dhis2-users-bounces+groutl=who.int@lists.launchpad.net] On Behalf Of Shurajit Dutta
Sent: 17 August 2017 14:26
To: dhis1-users
Subject: [Dhis2-users] API call to list all data elements within a dataset

Hi everyone,

Can someone share with me the API call to list all data elements within a dataset, perhaps the uid and name? Though if someone has something already that provides more fields that would also be great.

Thanks,

Nick

This should get you started:

api/dataElements?filter=dataSets.id:eq:DATASET_UID

···

On Thu, Aug 17, 2017 at 8:26 AM Shurajit Dutta shurajitdutta@gmail.com wrote:

Hi everyone,

Can someone share with me the API call to list all data elements within a dataset, perhaps the uid and name? Though if someone has something already that provides more fields that would also be great.

Thanks,

Nick


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

In later versions of DHIS2, it would be something like this I think

https://play.dhis2.org/dev/api/dataSets/lyLU2wR22tC?fields=dataSetElements[dataElement[id,name,description]]

···

On Thu, Aug 17, 2017 at 2:30 PM, Vladimer Shioshvili vshioshvili@gmail.com wrote:

This should get you started:

api/dataElements?filter=dataSets.id:eq:DATASET_UID

On Thu, Aug 17, 2017 at 8:26 AM Shurajit Dutta shurajitdutta@gmail.com wrote:

Hi everyone,

Can someone share with me the API call to list all data elements within a dataset, perhaps the uid and name? Though if someone has something already that provides more fields that would also be great.

Thanks,

Nick


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

Great, thanks both. Using Jason’s for later versions is working well.

Nick

···

On Thu, Aug 17, 2017 at 2:34 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

In later versions of DHIS2, it would be something like this I think

https://play.dhis2.org/dev/api/dataSets/lyLU2wR22tC?fields=dataSetElements[dataElement[id,name,description]]

On Thu, Aug 17, 2017 at 2:30 PM, Vladimer Shioshvili vshioshvili@gmail.com wrote:

This should get you started:

api/dataElements?filter=dataSets.id:eq:DATASET_UID

On Thu, Aug 17, 2017 at 8:26 AM Shurajit Dutta shurajitdutta@gmail.com wrote:

Hi everyone,

Can someone share with me the API call to list all data elements within a dataset, perhaps the uid and name? Though if someone has something already that provides more fields that would also be great.

Thanks,

Nick


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

Shurajit Dutta
Health Information Consultant

As JSON:

https://play.dhis2.org/dev/api/dataSets/lyLU2wR22tC.json?fields=dataSetElements[dataElement[id,name,description]]

···

On Thu, Aug 17, 2017 at 2:38 PM, Shurajit Dutta shurajitdutta@gmail.com wrote:

Great, thanks both. Using Jason’s for later versions is working well.

Nick


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

On Thu, Aug 17, 2017 at 2:34 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

In later versions of DHIS2, it would be something like this I think

https://play.dhis2.org/dev/api/dataSets/lyLU2wR22tC?fields=dataSetElements[dataElement[id,name,description]]

Shurajit Dutta
Health Information Consultant

On Thu, Aug 17, 2017 at 2:30 PM, Vladimer Shioshvili vshioshvili@gmail.com wrote:

This should get you started:

api/dataElements?filter=dataSets.id:eq:DATASET_UID

On Thu, Aug 17, 2017 at 8:26 AM Shurajit Dutta shurajitdutta@gmail.com wrote:

Hi everyone,

Can someone share with me the API call to list all data elements within a dataset, perhaps the uid and name? Though if someone has something already that provides more fields that would also be great.

Thanks,

Nick


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

Hi Nick,

I used this one to get the same:

/api/dataElements.json?filter=dataSetElements.dataSet.id:eq:Xd0ePcEz1nx&fields=description,id,displayName&paging=false

Regards

Akash Jindal

···

On Thu, Aug 17, 2017 at 5:55 PM, Shurajit Dutta shurajitdutta@gmail.com wrote:

Hi everyone,

Can someone share with me the API call to list all data elements within a dataset, perhaps the uid and name? Though if someone has something already that provides more fields that would also be great.

Thanks,

Nick


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Jason is right, my suggestion does not work in later versions. Akash’s gives you what I was trying to get:

https://play.dhis2.org/dev/api/dataElements?filter=dataSetElements.dataSet.id:eq:lyLU2wR22tC&fields=id,name,description&paging=false

···

On Thu, Aug 17, 2017 at 5:55 PM, Shurajit Dutta shurajitdutta@gmail.com wrote:

Hi everyone,

Can someone share with me the API call to list all data elements within a dataset, perhaps the uid and name? Though if someone has something already that provides more fields that would also be great.

Thanks,

Nick


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp