Extract a Zipped ObjectAdmin Scope
Notes:
-
Ensure you have installed the required package to use this SDK method.
-
Since the extraction process occurs asynchronously, the time in which the entire process is completed is dependent on the size of the zip file that is being extracted.
Parameters Used
| Parameter Name | Data Type | Definition |
|---|---|---|
| key | String | A mandatory parameter. Will be the name of the zip file, you need to extract. |
| destPath | String | A mandatory parameter. Will contain the complete path information of the destination, where the extracted objects will be stored in the bucket. |
You can use the unzipObject() SDK method to extract a zipped object in Stratus.
copy
const res = await bucket.unzipObject("sample.zip","output/");
console.log(res);
Example of Expected Response
copy
{
"key": "sample.zip",
"destination": "output/",
"task_id": "6963000000272049",
"message": "Zip extract scheduled"
}
Get Zip Extraction Status
The zip extraction process occurs asynchronously, and the time it takes to complete the extraction process is dependent on the size of the zip file.
Parameters Used
| Parameter Name | Data Type | Definition |
|---|---|---|
| taskId | String | This parameter will be returned in the response of the unzipObject() SDK method. It will contain the status of the extraction process. |
You need to use the taskId parameter, in the getUnzipStatus() SDK method, to determine the status of the extraction.
copy
const statusRes = await bucket.getUnzipStatus("sample.zip", 'taskId');
console.log(statusRes);
Example of Expected Response
copy
{
"task_id": "6963000000272049",
"status": "SUCCESS"
}
Last Updated 2026-07-02 14:51:41 +0530 IST
Yes
No
Send your feedback to us
Skip
Submit