Need support to edit data in DHIS2 in bulk

Hi DHIS2 community,
I need to edit data in DHIS2 in bulk. What would be the efficient way to do this? I tried to test with Postman, it allowed GET request but didn’t allow POST. Can you suggest on this please. Thank you in advance.

What are your trying to edit ? data (aggregate or tracker related) or metadata (orgunit, data element)

If it’s aggregate or tracker data, I would advise you use a “trade off” between bulk updates and pagination.

Most api of dhis2 accepts a /post payload with
{"theResources": [ resource1, resource2, ...]}

  • dataValuesSets
  • metaData you can even send a mix of objects (ex a program, its dataelements and program indicators/rules/…)
  • tracker can also receive an array of trackedEntities

Warn that the pagination can cause you already met some updated records.
so take care of writing your transformation into a idempotent way.

If you are comfortable with javascript you might be interested in Dhis2 taskr where you can write a script that combines api call loops over the records and update them.

see https://github.com/BLSQ/dhis2-taskr/blob/master/doc/user-manual.md#lets-update-things

1 Like

Hi @Paras_Khanal

what type of data you want to update in bulk?

1 Like