I tried this command line, and I got a 403 forbidden:
curl -i -u $API_TOKEN: -X DELETE https://$SERVER/data-deposit/v1.1/swordv2/edit-media/file/$ID
My user is a superadmin on the server, but I also added myself as admin for the dataset.
Can anyone suggest what I may have done wrong? I used the recipe from here: https://guides.dataverse.org/en/latest/api/sword.html#delete-a-file-by-database-id
I would use the Native API command:
https://guides.dataverse.org/en/latest/api/native-api.html#deleting-files
Using the example at that link.
I use only API commands from the Naive API list https://guides.dataverse.org/en/latest/api/native-api.html
I tried sword awhile back with mixed results.
Thank you!
Somehow this eluded my attention; I vaguely remembered that deleting files was only possible through sword...
Well, deleting returns an error after 50 minutes. This may be because the dataset contains 460k files, so I may have to delete the files using SQL...
50 minutes? Yikes! Are there any errors in server.log for either method (native vs. SWORD)?
Last updated: Nov 01 2025 at 14:11 UTC