Will there be an option to delete attachments through the API?

Will there be an option to delete attachments through the API as well?

Of course! When a user deletes an attachment via the API it calls DELETE on api/v2/assets/[assetID]/attachments/[attachmentID]. You can see this in action in the network tab in your browser.

The data endpoint at api/v2/assets/[assetID]/data includes the attachmentID as uid in the _attachments section for the specific submission.

So if you’re using a script you can look for any submissions with attachments, then take the uid and delete each one.

In the same section, you will then see "is_deleted": true to confirm that the deletion was successful.

2 Likes