Loading...

Download Object

Description

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

GET

{bucket_name}.zohostratus.com/{key}

copy

The above domain name will change with respect to the data center:

DC Domain Name
US zohostratus.com
EU zohostratus.eu
IN zohostratus.in
AU zohostratus.com.au
CA zohostratus.ca
SA zohostratus.sa
JP zohostratus.jp

Note:

  • If the API is used in the development environment, then the domain will be structured in this manner: https://<bucket_name>-development.zohostratus.com

  • It is advisable to collect the bucket URL from the console.

Path Parameters

project_id
Numerical
The unique ID of the project

bucket_name
String

key
String
The name of the object that needs to be downloaded

Query Parameters

version_id String
optional
This is an ID generated by Stratus when Versioning is enabled. You can use version_id to refer to the required object.

Request Headers

Authorization: Zoho-oauthtoken {oauth_token}

Optional Headers

Range: To download a specific byte range of an object

retrieve-meta: To retrieve the metadata of the object | Possible Values: True/False | Default Value: False

Scope

Stratus.fileop.READ

Query Params to Override Responses

The following query parameters can be added to modify responses and get the required response. These are all optional parameters. The override will only work if the request is successful.

responseContentType String
optional
Sets the Content-Type header of the response. Only standard IANA defined content types can be used.
responseContentLanguage String
optional
Sets the Content-Language header of the response
responseContentDisposition String
optional
Sets the Content-Disposition header of the response. The parameter value should be in this format:
attachment; filename=“name”
Example: attachment; filename=“logo.svg”
responseCacheControl String
optional
Sets the Cache-Control header of the response.
Example: public,max-age=3600,no-transform

Response Details

On successful execution, the response will contain the object will be downloaded and the success message will be displayed.

Possible Failure Responses

404 due to object/bucket not found:

Failure Response
copy
{
"status": 404,
"code": "key_not_found",
"message": "no such key is associated with any object in the bucket"
}
View more

403 Unauthorized. When you do not have the required permissions to perform the download operation

Failure Response
copy
{
"status": 403,
"code": "access_forbidden",
"message": "request denied by resource access policy"
}
View more
Sample Request
copy

curl -X GET https://{bucket_name}.zohostratus.com/{key} -H “Authorization: Zoho-oauthtoken 1000.910*************************16.2f*************************57”

Sample Response
copy

200 OK // Bytes of raw data

View more