Changing by API an attibute value or dataelement value for a tracker

Hi All,

I have a problem, we have a lot of data in the tracker by for now, too many bad data quality, we need to update some datavalue or attribute value mayby by API.

Who can help my?

Regards

Hi @Carloscnk,

Welcome back to the Community of Practice! :+1:

It is possible to use the Import / Export app by exporting the data and then use it again to import the new updated values. Maybe you could give it a try!

Thank you!

Thanks @Gassim

But now, if I want to change de orgunit?

It’s not possible to update just one dataelement value? because we have too many data to update

1 Like

@Carloscnk

For this kind of thing I often write a script.
Here are some examples to inspire you

2 Likes

You’re welcome @Carloscnk! I was thinking more like using tools like ‘fine and replace’ after downloading as a json file but you’d know the data you’re dealing with better so it might be the best solution to use a script as @didate suggested :slight_smile::+1:

Thanks!

Hi!
But now, which kind of url I will use?

1 Like

Just moments ago someone had a similar issue and wanted to update the ‘value type’ of a data element. I suggested using ‘partial updates’ please see:
https://docs.dhis2.org/en/develop/using-the-api/dhis-core-version-master/metadata.html#webapi_partial_updates