Loading...

Delete Object

Description

This API allows you to delete the required object stored in a bucket. The Bucket is referred by its unique bucket name, and the required object is referred using its name.

Request Details

Request URL

PUT

{api-domain}/baas/v1/project/{project_id}/bucket/object/

copy

project_id
Numerical
The unique ID of the project

Query Parameters

bucket_name Alphanumeric
mandatory

Request JSON

You must send a JSON with its corresponding values as shown below.

Sample Payload
copy
{
"objects": [
    {
    "key": "file1.jpeg",
    "version_id": "{version_id}"
    },
    {
    "key": "file2.jpeg"
    },
    {
    "key": "file3.jpeg"
    }
],
"ttl_in_seconds": 100
}
View more

You will feed this Request JSON to your Request Body, and you need to provide the value of:

key
mandatory
This JSON key will contain the required object’s name that needs to be deleted.
ttl_in_seconds Number
optional
This JSON key will contain time in seconds. Once the ttl_in_seconds is reached the delete operation will be carried out.

Request Headers

Authorization: Zoho-oauthtoken {oauth_token}

Optional Headers

CATALYST-ORG: {org_id}

Environment: Development

Scope

ZohoCatalyst.buckets.objects.DELETE

Response Details

On successful execution, the response will contain the success message confirming the delete operation was successful.

Sample Request
copy

curl -X PUT https://api.catalyst.zoho.com/baas/v1/project/10108000003823392/bucket/object?bucket_name=zylker-bucket/ -H “Authorization: Zoho-oauthtoken 1000.910*************************16.2f*************************57” -H “Content-Type:application/json” --data-raw $’{““status”: “success”,“data”:{“message”: “Deletion successful”}"}'

Sample Response
copy
{
"status": "success",
"data": {
    "message": "Deletion successful"
}
}
View more