Further to my other email thread regarding Program deletion, we have been working on functionality to delete full Data Sets and all associated data and metadata via the Web API using:
The instance being used is assuming that data elements are specific to a particular data set and will not be reused across data sets.
This is our methodology in order of execution, all via the Web API:
- Delete Data Set Data
- iterate through all associated data elements and use the /maintenance/dataPruning/dataElements functionality
- Delete Data Set Metadata
- delete all related indictors for data set data elements
- delete related data elements
- delete related category option combos / category combos
- Delete Data Set
- delete data set
I see some things in the data set payload such as:
- “translations”: ,
- “userGroupAccesses”: ,
- “attributeValues”: ,
- “sections”: ,
- “compulsoryDataElementOperands”: ,
Do any of these need to be explicitly deleted in order to delete a data set or will they cascade? Are there any other associated objects I haven’t mentioned that we need to delete? So far we’ve been implementing on a trial and error basis.
Please let me know if there are any other considerations we should be incorporating into our logic.