Hi Simen We had a similar discussion in South Africa a few hours ago. If you have your top level orgunit UID (e.g. 'JLA7wl59oN3') you can drill using API calls such as: api/organisationUnits?filter=level:eq:2&filter=parent.id:eq:JLA7wl59oN3
If you don't know your top level UID: api/organisationUnits?filter=level:eq:1 Regards Greg On Mon, Dec 15, 2014 at 3:34 PM, Simen Skogly Russnes < [email protected]> wrote: > > Dear all, > > can someone give me a suggestion on how to retrieve all orgunits through > the WebAPI, including parent-child relationships of orgunits, so that an > orgunit view can be created similarly to the view in Data Entry and > Individual Records in DHIS 2? Perhaps it's possible to pass a parameter to > api/organisationUnits so to include children or something, or in analytics > get orgunits to include parent when passing the LEVEL-<level> parameter. > The query wouldn't happen very often in the use case, but a low number of > requests to the WebAPI would be preferable as ping rather than bandwidth is > an issue. > > Regards, > Simen S. Russnes > > _______________________________________________ > Mailing list: https://launchpad.net/~dhis2-devs > Post to : [email protected] > Unsubscribe : https://launchpad.net/~dhis2-devs > More help : https://help.launchpad.net/ListHelp > > -- *Health Information Systems Program* *- - - - - - - **- - - - - - - **- - - - - - - **- - - - - - - **- - - - - * Mobile : 073 246 2992 Landline: 021 554 3130 Fax: 086 733 8432 Skype: gregory_rowles
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : [email protected] Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp

