1.59 Organisation units

The organisationUnits resource follows the standard conventions as other metadata resources in DHIS2. This resource supports some additional query parameters.

1.59.1 Get list of organisation units

To get a list of organisation units you can use the following resource.

/api/26/organisationUnits
Organisation units query parameters
Query parameter Options Description
userOnly false | true Data capture organisation units associated with current user only.
userDataViewOnly false | true Data view organisation units associated with current user only.
userDataViewFallback false | true Data view organisation units associated with current user only with fallback to data capture organisation units.
query string Query against the name, code and ID properties.
level integer Organisation units at the given level in the hierarchy.
maxLevel integer Organisation units at the given max level or levels higher up in the hierarchy.
memberCollection string For displaying count of members within a collection, refers to the name of the collection associated with organisation units.
memberObject UID For displaying count of members within a collection, refers to the identifier of the object member of the collection.

1.59.2 Get organisation unit with relations

To get an organisation unit with related organisation units you can use the following resource.

/api/24/organisationUnits/{id}
Organisation unit parameters
Query parameter Options Description
includeChildren false | true Include immediate children of the specified organisation unit, i.e. the units at the immediate level below in the subhierarchy.
includeDescendants false | true Include all children of the specified organisation unit, i.e. all units in the sub-hierarchy.
includeAncestors false | true Include all parents of the specified organisation unit.
level integer Include children of the specified organisation unit at the given level of the sub-hierarchy (relative to the organisation unit where the immediate level below is level 1).