Loading...

Copy Object

Description

This API allows you to copy 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

POST

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

copy

project_id
Numerical
The unique ID of the project

Query Parameters

bucket_name Alphanumeric
mandatory
object_key String
mandatory
Will contain the complete name of the required object.
destination String
mandatory
Will contain the location of where the object has to be copied to.

Request Headers

Authorization: Zoho-oauthtoken {oauth_token}

Optional Headers

CATALYST-ORG: {org_id}

Environment: Development

Scope

ZohoCatalyst.buckets.objects.CREATE

Response Details

On successful execution, the response will contain the name of the copied object, the location of where it is copied to, and the success message confirming the copy action.

Sample Request
copy

curl -X POST https://api.catalyst.zoho.com/baas/v1/project/10108000003823392/bucket/object/copy?bucket_name=myBucketName&object_key=mappedsample/Archive.zip&destination=mappedsample/Unarchive/ -H “Authorization: Zoho-oauthtoken 1000.910*************************16.2f*************************57”

Sample Response
copy
{
"status": "success",
"data": {
    "object_key": "image2.png",
    "copy_to": "folder2/",
    "message": "Copy successful"
}
}
View more