...
To export the organization, we need to use an API request. You can use either Postman or the browser, but make sure to have an extension to change the text to JSON format.
Filters:
https://{serverSource}/api/organisationUnits.json
...
Code Block | ||
---|---|---|
| ||
{ "organisationUnits": [ { "code": "OU_651071", "name": "Adonkia CHP", "created": "2012-02-17T15:54:39.987", "lastUpdated": "2017-05-22T15:21:48.515", "translations": [], "favorites": [], "sharing": { "external": false, "users": {}, "userGroups": {} }, "shortName": "Adonkia CHP", "dimensionItemType": "ORGANISATION_UNIT", "legendSets": [], "parent": { "id": "qtr8GGlm4gg" }, "children": [], "path": "/ImspTQPwCqd/at6UHUQatSo/qtr8GGlm4gg/Rp268JB6Ne4", "openingDate": "2010-01-01T00:00:00.000", "dataSets": [ ], "programs": [ ], "users": [], "leaf": true, "dimensionItem": "Rp268JB6Ne4", "displayShortName": "Adonkia CHP", "displayName": "Adonkia CHP", "access": { "manage": true, "externalize": false, "write": true, "read": true, "update": true, "delete": true }, "favorite": false, "href": "https://play.im.dhis2.org/dev/api/organisationUnits/Rp268JB6Ne4", "displayFormName": "Adonkia CHP", "id": "Rp268JB6Ne4", "attributeValues": [], "organisationUnitGroups": [ { "id": "f25dqv3Y7Z0" } ], "level": 4, "ancestors": [ { "id": "ImspTQPwCqd" }, { "id": "at6UHUQatSo" }, { "id": "qtr8GGlm4gg" } ] }, { "code": "OU_278371", "name": "Afro Arab Clinic", "created": "2012-02-17T15:54:39.987", "lastUpdated": "2017-05-22T15:21:48.518", "translations": [ { "locale": "en_GB", "property": "SHORT_NAME", "value": "Afro Arab Clinic" }, { "locale": "en_GB", "property": "NAME", "value": "Afro Arab Clinic" } ], "favorites": [], "sharing": { "external": false, "users": {}, "userGroups": {} }, "shortName": "Afro Arab Clinic", "dimensionItemType": "ORGANISATION_UNIT", "legendSets": [], "parent": { "id": "qtr8GGlm4gg" }, "children": [], "path": "/ImspTQPwCqd/at6UHUQatSo/qtr8GGlm4gg/cDw53Ej8rju", "openingDate": "2008-01-01T00:00:00.000", "dataSets": [ ], "programs": [ ], "users": [], "leaf": true, "dimensionItem": "cDw53Ej8rju", "displayShortName": "Afro Arab Clinic", "displayName": "Afro Arab Clinic", "access": { "manage": true, "externalize": false, "write": true, "read": true, "update": true, "delete": true }, "favorite": false, "href": "https://play.im.dhis2.org/dev/api/organisationUnits/cDw53Ej8rju", "displayFormName": "Afro Arab Clinic", "id": "cDw53Ej8rju", "attributeValues": [], "organisationUnitGroups": [ { "id": "f25dqv3Y7Z0" }, { "id": "RXL3lPSK8oG" } ], "level": 4, "ancestors": [ ] } ] } |
Download the file and save with JSON format.
Import the Organisation Units on the target server
Log in into the target server
...
Preparing Organisation Units [Both OU match UIDs, OU do not match]
Exporting data
Preparing data
GET API data
Send data
...
Open the Import/Export tool
Select Import Metadata
Import the Organisation Units
Verify the Organisation Units using the Maintenance App