Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.antryk.com/llms.txt

Use this file to discover all available pages before exploring further.

Delete an object from Antryk Storage using a clean and RESTful API structure. This endpoint allows you to permanently remove a file from a specific bucket by defining both the bucket name and file path directly in the URL. This eliminates the need for request bodies and simplifies the deletion process.
curl --request DELETE \
  --url "https://storage.apis.antryk.com/api/v1/buckets/:yourBucketName/objects/:yourFilePath" \
  --header "x-access-key: YOUR_ACCESS_KEY" \
  --header "x-secret-key: YOUR_SECRET_KEY"
This endpoint does not accept a request body. All required information such as bucket name and object path must be passed via the URL, while authentication must be provided using headers.
For Node.js applications, it is recommended to use the official @antryk/sdk. The SDK abstracts authentication, request handling, and validation, allowing you to upload files using simple method calls instead of manually constructing HTTP requests.
This is the recommended and modern approach for deleting objects from Antryk Storage:
  • No request body is required.
  • The bucket name and object path are defined directly in the URL.
  • Authentication is handled via headers:
    • x-access-key
    • x-secret-key
This approach improves API clarity, enhances security by avoiding sensitive data in the body, and aligns with RESTful best practices.
⚠️ The older approach (sending bucket, key, accessKey, and secretKey in the body) may still be supported for backward compatibility, but it is strongly recommended to migrate to this new method

Request Parameters

yourBucketName
string
required
The name of the storage bucket. This is specified directly in the URL.
yourFilePath
string
required
The full path (including filename) of the object you want to delete from the bucket.
x-access-key
string
required
Your Antryk access key used for authentication. You can obtain this from the Antryk Console.
x-secret-key
string
required
Your Antryk secret key used for authentication. Keep this secure and never expose it publicly.

Examples

yourBucketName
string
required
Example: upload-final-v1
yourFilePath
string
required
Example: uploads/po.exe
x-access-key
string
required
Example: YOUR_ACCESS_KEY
x-secret-key
string
required
Example: YOUR_SECRET_KEY

Additional Notes

  • Deleting an object is a permanent action and cannot be undone.
  • Ensure the file path is correct before making the request.
  • The yourFilePath should include the full directory structure along with the filename.
  • If the object does not exist, the API may return an error depending on implementation.
  • Always keep your access credentials secure and avoid exposing them in client-side code.

Response

Returns a JSON object confirming the deletion.
{
  "success": true,
  "message": "File deleted successfully",
  "data": {
    "key": "tutorial/docs/todo.txt"
  }
}