stephocay
(Stephen Ocaya)
5 December 2016 14:33
1
Dear Dev,
I am not sure if I am doing it wrongly. When I try to access dataValueSets via the API (DHIS2 2.25), the return values does not have dataValues as documented.
To reproduce the issue: Try the example below:
https://play.dhis2.org/demo/api/dataValueSets.json?dataSet=pBOMPrpg1QX&period=201401&orgUnit=DiszpKrYNg8
Attached is the output for the above and missing the “dataValues”: sections
Kindly advise how best to do that.
Sample Return Values::
{“dataSet”:“XnjkPghTBX9”,“period”:“201601”,“orgUnit”:“aXmBzv61LbM”}
···
You can do anything, but not everything.
Dear Ocaya Stephen,
It seems you are trying to pull data for period that has no data value.to get it different try to use
https://play.dhis2.org/demo/api/dataValueSets.json?dataSet=pBOMPrpg1QX&period=201512&orgUnit=DiszpKrYNg8
Hopes it will help to know the cause
Thanks
···
On Mon, Dec 5, 2016 at 5:33 PM, Ocaya Stephen stephocay@gmail.com wrote:
Dear Dev,
I am not sure if I am doing it wrongly. When I try to access dataValueSets via the API (DHIS2 2.25), the return values does not have dataValues as documented.
To reproduce the issue: Try the example below:
https://play.dhis2.org/demo/api/dataValueSets.json?dataSet=pBOMPrpg1QX&period=201401&orgUnit=DiszpKrYNg8
Attached is the output for the above and missing the “dataValues”: sections
Kindly advise how best to do that.
Sample Return Values::
{“dataSet”:“XnjkPghTBX9”,“period”:“201601”,“orgUnit”:“aXmBzv61LbM”}
–
You can do anything, but not everything.
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
stephocay
(Stephen Ocaya)
5 December 2016 16:08
3
Thanks. It works.
I have tried with different orgUnit with data.
But it would be better if we could put an empty dataValues instead of leaving it completely out. Just my suggestion.
Regards.
···
On Dec 5, 2016 6:19 PM, “tuzo engelbert” tuzoengelbert@gmail.com wrote:
Dear Ocaya Stephen,
It seems you are trying to pull data for period that has no data value.to get it different try to use
https://play.dhis2.org/demo/api/dataValueSets.json?dataSet=pBOMPrpg1QX&period=201512&orgUnit=DiszpKrYNg8
Hopes it will help to know the cause
Thanks
On Mon, Dec 5, 2016 at 5:33 PM, Ocaya Stephen stephocay@gmail.com wrote:
Dear Dev,
I am not sure if I am doing it wrongly. When I try to access dataValueSets via the API (DHIS2 2.25), the return values does not have dataValues as documented.
To reproduce the issue: Try the example below:
https://play.dhis2.org/demo/api/dataValueSets.json?dataSet=pBOMPrpg1QX&period=201401&orgUnit=DiszpKrYNg8
Attached is the output for the above and missing the “dataValues”: sections
Kindly advise how best to do that.
Sample Return Values::
{“dataSet”:“XnjkPghTBX9”,“period”:“201601”,“orgUnit”:“aXmBzv61LbM”}
–
You can do anything, but not everything.
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
Lars
(Lars Øverland)
5 December 2016 16:17
4
Hi Ocaya,
we do have an empty element, for XML:
https://play.dhis2.org/demo/api/dataValueSets.xml?dataSet=pBOMPrpg1QX&period=201401&orgUnit=DiszpKrYNg8
for JSON is what you see the equivalent - a JSON object with data set / period / org unit properties.
regards,
Lars
···
On Mon, Dec 5, 2016 at 5:08 PM, Ocaya Stephen stephocay@gmail.com wrote:
Thanks. It works.
I have tried with different orgUnit with data.
But it would be better if we could put an empty dataValues instead of leaving it completely out. Just my suggestion.
Regards.
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 Dec 5, 2016 6:19 PM, “tuzo engelbert” tuzoengelbert@gmail.com wrote:
Dear Ocaya Stephen,
It seems you are trying to pull data for period that has no data value.to get it different try to use
https://play.dhis2.org/demo/api/dataValueSets.json?dataSet=pBOMPrpg1QX&period=201512&orgUnit=DiszpKrYNg8
Hopes it will help to know the cause
Thanks
On Mon, Dec 5, 2016 at 5:33 PM, Ocaya Stephen stephocay@gmail.com wrote:
Dear Dev,
I am not sure if I am doing it wrongly. When I try to access dataValueSets via the API (DHIS2 2.25), the return values does not have dataValues as documented.
To reproduce the issue: Try the example below:
https://play.dhis2.org/demo/api/dataValueSets.json?dataSet=pBOMPrpg1QX&period=201401&orgUnit=DiszpKrYNg8
Attached is the output for the above and missing the “dataValues”: sections
Kindly advise how best to do that.
Sample Return Values::
{“dataSet”:“XnjkPghTBX9”,“period”:“201601”,“orgUnit”:“aXmBzv61LbM”}
–
You can do anything, but not everything.
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
Lars Helge Øverland
Lead developer, DHIS 2
University of Oslo
Skype: larshelgeoverland
lars@dhis2.org
http://www.dhis2.org
There are no data values returned because there are no data values matching your query (in particular for the period specified).
Try, for example, this:
https://play.dhis2.org/demo/api/dataValueSets.json?dataSet=pBOMPrpg1QX&orgUnit=DiszpKrYNg8&period=201602
···
On Mon, Dec 5, 2016 at 3:33 PM, Ocaya Stephen stephocay@gmail.com wrote:
Dear Dev,
I am not sure if I am doing it wrongly. When I try to access dataValueSets via the API (DHIS2 2.25), the return values does not have dataValues as documented.
To reproduce the issue: Try the example below:
https://play.dhis2.org/demo/api/dataValueSets.json?dataSet=pBOMPrpg1QX&period=201401&orgUnit=DiszpKrYNg8
Attached is the output for the above and missing the “dataValues”: sections
Kindly advise how best to do that.
Sample Return Values::
{“dataSet”:“XnjkPghTBX9”,“period”:“201601”,“orgUnit”:“aXmBzv61LbM”}
–
You can do anything, but not everything.
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
–
Halvdan Hoem Grelland
Software developer, DHIS 2
University of Oslo
http://www.dhis2.org