Delete a file or folder at the specified path.
curl -X DELETE "https://storage.cludz.net/storage/{uuid}/documents/report.pdf" \
-H "Token: YOUR_STORAGE_TOKEN"
{
"statusCode": 200,
"message": "Deleted successfully"
}
Folders are deleted recursively, including all files and subfolders:
curl -X DELETE "https://storage.cludz.net/storage/{uuid}/old-documents/" \
-H "Token: YOUR_STORAGE_TOKEN"
!CAUTION Deleting a folder permanently removes all contents. This action cannot be undone.
Delete operations require the canDelete permission on the parent directory.
| Status | Message |
|---|---|
401 | Authentication required |
403 | No delete permission |
404 | Path not found |
const response = await fetch('https://storage.cludz.net/storage/{uuid}/documents/old-file.pdf', {
method: 'DELETE',
headers: {
'Token': 'YOUR_STORAGE_TOKEN'
}
});
if (response.ok) {
console.log('File deleted successfully');
}
import requests
response = requests.delete(
'https://storage.cludz.net/storage/{uuid}/documents/old-file.pdf',
headers={'Token': 'YOUR_STORAGE_TOKEN'}
)
if response.status_code == 200:
print('File deleted successfully')