A file decompression task lets you decompress specific files or an entire compressed package to a specified location. Supported formats include Zip, RAR, and 7z.
Operation description
This API is in public preview. If you have any questions, join our DingTalk group to provide feedback. For the group number, see Contact us.
-
Before you use this API, review the billing methods and pricing for Intelligent Media Management.
Important Timeliness is not guaranteed for asynchronous tasks. -
File count limit: A compressed package can contain a maximum of 80,000 files.
-
File size limit: 200 GB for Zip and RAR formats, and 50 GB for 7z format.
-
File decompression tasks use stream decompression, which outputs files as they are decompressed. If an operation is aborted due to file corruption, the files that have already been decompressed are not deleted.
-
This is an asynchronous API. Task information is stored for only 7 days and cannot be retrieved after this period. To view the task information, you can call the GetTask or ListTasks operation with the returned
TaskId. Alternatively, you can set the Notification parameter to receive task information through an asynchronous notification message.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
imm:CreateFileUncompressionTask |
create |
*Project
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectName |
string |
Yes |
The name of the project. For more information, see Create a project. |
test-project |
| CredentialConfig | CredentialConfig |
No |
Leave this parameter empty unless you have specific requirements. The chained authorization configuration. This parameter is optional. For more information, see Use chained authorization to access other entity resources. |
|
| Password |
string |
No |
The password for the encrypted compressed package. |
123456 |
| UserData |
string |
No |
Custom user information. It is returned in the asynchronous notification message to help you associate the notification with your system. The maximum length is 2,048 bytes. |
test-data |
| SelectedFiles |
array |
No |
The list of files to decompress. If this parameter is empty, the entire compressed package is decompressed. The default value is empty. |
|
|
string |
No |
The name of the file to decompress. This is the path relative to the root directory of the compressed package. |
test-dir/test.jpg |
|
| SourceURI |
string |
Yes |
The Object Storage Service (OSS) address where the compressed file is stored. The OSS address must be in the `oss://${Bucket}/${Object}` format. `${Bucket}` is the name of the OSS bucket in the same region as the current project. `${Object}` is the full path of the file, including the file name extension. |
oss://test-bucket/test-object.zip |
| Notification | Notification |
No |
The message notification configuration. For details, click Notification. For the format of asynchronous notification messages, see Asynchronous notification message format. Note
Intelligent Media Management API callbacks do not support custom webhook addresses. Use MNS instead. |
|
| TargetURI |
string |
No |
The destination OSS address for the decompressed files. The selected files or the entire compressed package are decompressed to this address. The OSS address must be in the `oss://${Bucket}/${Object}` format. `${Bucket}` is the name of the OSS bucket in the same region as the current project. `${Object}` is the full path of the file, including the file name extension. |
oss://test-bucket/test-dir/ |
To obtain detailed decompression information when you create a decompression task, set the `ExtendedMessageURI` parameter in `Notification`. The file contains information in the following structure:
{
"Password" : "The password of the compressed package",
"IsEncryption": "true/false, specifies whether the compressed package is encrypted",
"ArchiveFiles": [
{
"URI": "The address of the decompressed file. Example: oss://test-bucket/test-dir/test.txt",
"PathName": "The path of the file relative to the compressed package. Example: ./test.txt",
"Reason": "If the preview fails, this parameter indicates the reason for the failure.",
"IsFolder": "true/false, specifies whether the file is a folder",
"PackedSize": "The size of the file in the compressed package",
"UnPackedSize": "The size of the file after decompression",
"FileAccessTime": "File time information",
},
{
"URI": "oss://test-bucket/test-dir/text.doc",
"PathName": "./text.doc",
"Reason": "",
"IsFolder": "true",
"PackedSize": "102",
"UnPackedSize": "150",
"FileAccessTime": "2023-07-21T09:46:35Z",
},
]
}
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Response struct |
||
| RequestId |
string |
The request ID. |
EC564A9A-BA5C-4499-A087-D9B9E76E***** |
| EventId |
string |
The event ID. |
0ED-1Bz8z71k5TtsUejT4UJ16Es***** |
| TaskId |
string |
The task ID. |
FileUncompression-16ab5dd6-af02-480e-9ed7-a8d51b1***** |
Examples
Success response
JSON format
{
"RequestId": "EC564A9A-BA5C-4499-A087-D9B9E76E*****",
"EventId": "0ED-1Bz8z71k5TtsUejT4UJ16Es*****",
"TaskId": "FileUncompression-16ab5dd6-af02-480e-9ed7-a8d51b1*****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.