Delete Files
Delete files at Zustack.
Learn how to delete files from your bucket using the Zustack API.
This action will permanently remove the file and its associated metadata from the Zustack network.
Prerequisites
Section titled “Prerequisites”Before you begin, make sure you have:
- A bucket created
- A file already uploaded
- The file ID of the file you want to delete
- A JWT signed with your API Key with the scope claim set to delete.
Request Parameters
Section titled “Request Parameters”| Parameter | Type | Description |
|---|---|---|
file_id | string | The ID of the file you want to delete. |
bucket_id | string | The ID of the bucket associated with your file. |
Example Request
Section titled “Example Request”First, set your environment variables:
export FILE_ID=your_file_idexport BUCKET_ID=your_bucket_idexport JWT=your_jwt_tokenThen make the DELETE request:
curl -X DELETE "https://zustack.com/files/${FILE_ID}/${BUCKET_ID}" \ -H "Authorization: Bearer ${JWT}"Response
Section titled “Response”If the deletion is successful, the server will return:
- HTTP Status:
200 OK - The file will be removed from your bucket and no longer accessible.