Hopefully this is the correct place to post this and I have not missed the answer somewhere else. I am pulling data from an existing DHIS2 instance version 2.37. I’m using the dataValueSets endpoint and I would like to flag soft deleted records. I have tried to use the &includeDeleted=true in my api call but noticed this is not adding a deleted flag to the records returned. I have tried to use the dataValueAudit endpoint but it is not enabled and I’m not an administrator of the system to enable it. Without a deleted flag or any auditing I’m stuck trying to figure out what the deleted records are. My only idea is to pull twice, once with deleted records included and once without them, then compare the two, but that would be very resource intensive for every dataset in the system. Any ideas, or am I missing something obvious?
Welcome to the DHIS2 Community of Practice!
You might want to upgrade your instance to one of the latest and supported versions (currently 40+). If you must use version 2.37, please make sure that you update it to the latest patch (but this is not a guarantee that it will fix some of issues that are fixed in the supported versions.
You could test to see if the API call is working in one of the play.dhis2.org instances. Please feel free to share an example from play if you face the same issue because then we might want to debug if there’s a bug issue!
I see it now. On deleted records I have an attribute “deleted”: true, but that deleted attribute does not exist at all for records that are not deleted. I just assumed it wasn’t there. Thank you for your help.