iaso
iaso copied to clipboard
IA-2907 New API endpoint for Org Unit Tree
New API endpoint for Org Unit Tree (used by the tree picker in the front-end).
Related elements:
- JIRA ticket : IA-2907
Doc
Changes
Changes to the Org Unit Tree API
This PR provides a common endpoint for exploring and searching the Org Unit Tree:
-
/api/orgunits/tree/ -
/api/orgunits/tree/search/?search=congo&page=2&limit=10
Params are optional:
| Old | New | Type | Notes |
|---|---|---|---|
rootsForUser |
removed | ||
parent_id |
parent_id |
number |
If not provided, the root of the tree is returned |
| N/A | force_full_tree |
bool |
Force full access to the tree |
ignoreEmptyNames |
ignore_empty_names |
bool |
The case is different |
defaultVersion |
version |
integer |
Version ID |
source |
data_source_id |
integer |
Data Source ID |
validation_statuses |
validation_status |
string |
Can be combined |
| N/A | search |
string |
Used to search the tree |
Changes for DataSource
Allow to customise the tree display with options on DataSource.
This change is reflected in the API.
How to test
Use DRF UI at /api/orgunits/tree/: