dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #48009
Re: [Dhis2-users] Issues with Reading Data Values via the dataValueSets
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@xxxxxxxxx> 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.
>
> On Dec 5, 2016 6:19 PM, "tuzo engelbert" <tuzoengelbert@xxxxxxxxx> 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@xxxxxxxxx>
>> 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=p
>>> BOMPrpg1QX&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@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~dhis2-users
>>> More help : https://help.launchpad.net/ListHelp
>>>
>>>
>>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@xxxxxxxxxxxxxxxxxxx
> 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@xxxxxxxxx
http://www.dhis2.org <https://www.dhis2.org/>
References