How to transfer all TEA and program stages from one org. unit to another org. unit in version 2.30

Hi @Oduro_Antiri

This operation will require few steps to complete it:

  1. Get all your TEIs like:
    https://your_domain/api/trackedEntityInstances.json?program=PROGRAM_UID&ou=OU_UID&fields=*
  2. Change the all orgUnit -uid to the new orgUnit -uid
  3. Update the TEIs
  4. Do Ownership transfer for each TEI like:
    https://your-domain/api/tracker/ownership/transfer?trackedEntityInstance=**TEI_UID**&ou=**NEW_OU_UID**&program=**PROGRAM_UID**

So it can be done with Postman manually. I have done this few times recently.
And this is quite time consuming operations.

Good luck
Regards,
Ulanbek

3 Likes