I’m looking to identify when (i.e. the time and date) events are deleted in DHIS2.
I’m already aware of the include deleted functionality in the API (e.g. api/event/includeDeleted=true), and the deleted column in the back-end, however neither of these include a time-stamp. Furthermore the ‘lastupdated’ field does not capture the time and date of deletion.
Is there any way to identify when events were deleted?
Notice I’m testing in one of the latest instances. I wasn’t able to get to the scenario where I can find an event that said “deleted: true” using the current /api/tracker/events api endpoint. Also, please note that the endpoint you mentioned is deprecated (deprectated endpoitns).
If you could help me reproduce the scenario where we have an deleted: true using the API? Thanks a lot! (also, welcome back! )
Sorry I should have said I was testing on v2.38, however the same applies to v40.2. The lastUpdated field does not change when an event is deleted. You can replicate this on play by deleting an event and then view the soft-deleted event DHIS 2 Demo - Sierra Leone[event UID]&includeDeleted=true. I’m understand their is plans to change this in future such that the lastUpdatedDate updates when an event is deleted.
Audit tables are the next best thing I’ve discovered (however Tracker and Aggregate audits only available via SQL): Audit - DHIS2 Documentation