← Back to team overview

dhis2-users team mailing list archive

Re: API: Getting all sub-ordinate organisationUnits from a root

 

Dear Uwe,

api/organisationUnits.json?paging=false&fields=id,name,children[id,name,children[id,name,children[id,name]]]

Note the inside children[id,name]

Alex

On Wed, Aug 10, 2016 at 4:10 PM, Uwe Wahser <uwe@xxxxxxxxx> wrote:

> Dear all,
>
> is there a way to read a certain organisation with all its ancestors on
> all/specific lower levels via api? Something like the "children" parameter
> in
> the dataValueSets api for the organisationUnits api would be helpful ...
>
> The alternative would be looping down the hierarchy level by level from
> outside,
> which I'd like to avoid.
>
> Thanks a lot,
>
> Uwe (currently on 2.23, could upgrade to 2.24)
>
> _______________________________________________
> 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
>



-- 
Alex Tumwesigye

Technical Advisor - DHIS2 (Consultant),
Ministry of Health/AFENET  | HISP Uganda
Kampala
Uganda
+256 774149 775, + 256 759 800161
Skype ID: talexie

IT Consultant (Servers, Networks and Security, Health Information Systems -
DHIS2, Disease Outbreak & Surveillance Systems) & Solar Consultant


"I don't want to be anything other than what I have been - one tree hill "

Follow ups

References