Bulk delete form submissions

Hello,

I have been talked to permanently delete some records form our productions server. The data sits within more than one org unit (Health Facility) and has a defined timeline. After referring to the document I got something like:

POST /api/v1/bulk-delete
Content-Type: application/json

{
  "docs": [
    { "_id": "id1" },
    { "_id": "id2" },
    ...
    { "_id": "id150" }
  ]
}

The above is not elaborated in detail within CHT documentations. Please guide me if you have encountered this before.

Thanks,

Job

Hi @Job_Isabai

The CHT doesn’t really provide a clean delete procedure. The closest to what we have is the /api/v1/bulk-delete endpoint you have already found.
The way that this endpoint works is that you pass it the document ids that you wish to delete, just like in the example you gave.
The endpoint does one cleanup step, where if a contact is marked for deletion, it checks the contact’s parent to see if the contact to be deleted is the primary contact - and if so edits the parent as well - but this covers just one case of primary contacts and is far from being comprehensive.

Hi @diana ,

Please share with me the documentation or reference to this call.

Thanks,

Job