Delete an uploaded file.
Removes the file from both R2 storage and the database.
Python
import requests url = "https://www.datalab.to/api/v1/files/{file_id}" headers = {"X-API-Key": "<api-key>"} response = requests.delete(url, headers=headers) print(response.text)
{ "message": "<string>", "success": true }
Successful Response
Response after deleting a file.
Confirmation message
Whether the deletion was successful
Was this page helpful?