dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #50104
Re: DHIS-2 API
Hi Omer,
Like Harsh says, just replace the level param with a filter. In your case
it will be:
*api/organisationUnits/cdp3S26sBwA.json?**fields*
*=children[id,name,level]&includeDescendants=true&filter=children.level:eq:6*
On 20 September 2017 at 08:36, Harsh Atal <harsh.atal@xxxxxxxxx> wrote:
> Hi Omer
>
> May be this works for you :
>
> *https://play.dhis2.org/demo/api/organisationUnits/ImspTQPwCqd?fields=children[id,level]&includeDescendants=true&filter=children.level:eq:3
> <https://play.dhis2.org/demo/api/organisationUnits/ImspTQPwCqd?fields=children[id,level]&includeDescendants=true&filter=children.level:eq:3>*
>
>
> Regards
> harsh
>
>
>
>
>
> On 20 September 2017 at 11:42, Lars Helge Øverland <lars@xxxxxxxxx> wrote:
>
>> Hi Omer,
>>
>> it seems you are right. Please report it as a bug in Jira. We will have a
>> look at it.
>>
>> regards,
>>
>> Lars
>>
>>
>> On Wed, Sep 20, 2017 at 6:52 AM, Omer Butt <omerbutt2521@xxxxxxxxx>
>> wrote:
>>
>>> Hi,
>>> can you please how to get a level 6 orgunit only by using DHIS-2 API;
>>>
>>> I used this api but It Respone all org unit under specific org unit.
>>> I want only level 6 org unit that uder specific org unit.
>>>
>>> * level=6 conditon not working. How to use it ?*
>>> *URL:*
>>>
>>>
>>> *API:/api/organisationUnits/cdp3S26sBwA.json?includeDescendants=true&level=6*
>>>
>>> Kindly Help me .
>>>
>>> _______________________________________________
>>> 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
>>>
>>>
>>
>>
>> --
>> Lars Helge Øverland
>> Lead developer, DHIS 2
>> University of Oslo
>> Skype: larshelgeoverland
>> lars@xxxxxxxxx
>> http://www.dhis2.org <https://www.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
>>
>>
>
> _______________________________________________
> 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
>
>
--
Jan Henrik Øverland
Software developer, DHIS 2
University of Oslo
http://www.dhis2.org <https://www.dhis2.org/>
References