Deletion of Data Set and all associated objects via API v 2.25


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:



Build revision:


Build date:

2017-05-19 12:47

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:

  1. Delete Data Set Data
  2. iterate through all associated data elements and use the /maintenance/dataPruning/dataElements functionality
  3. Delete Data Set Metadata
  4. delete all related indictors for data set data elements
  5. delete related data elements
  6. delete related category option combos / category combos
  7. Delete Data Set
  8. 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.




Lorill Crees
Project Leader / Senior Developer
2Paths Solutions Ltd.
skype: lorill2paths

(604) 689-4123 x 15