← Back to team overview

dhis2-devs team mailing list archive

WebAPI getting all orgunits with hierarchy info

 

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
 		 	   		  

Follow ups