CreateFileUncompressionTask
Creates a file extraction task to decompress specified files from an archive to a specific location, or decompress the entire archive. Supported compression formats include ZIP, RAR, and 7z.
Operation description
This API operation is in public preview. If you encounter any issues, join the DingTalk group for feedback. For the DingTalk group ID, refer to Contact us.
-
Before you call this API operation, make sure that you fully understand the billing methods and pricing of Intelligent Media Management.
Important Asynchronous tasks do not guarantee timeliness. -
File count limit: An archive can contain up to 80,000 files.
-
File size limit: ZIP and RAR formats support up to 200 GB, and the 7z format supports up to 50 GB.
-
File extraction tasks use streaming decompression, decompressing and outputting files simultaneously during processing. If file corruption occurs during decompression, causing the decompression operation to abort, the already decompressed files are not deleted.
-
This API operation is asynchronous. After a task starts, task information is retained for only 7 days. You cannot retrieve the information after 7 days. Call the GetTask or ListTasks API operation to obtain the returned
TaskIdand view the task information. You can also configure the Notification parameter to receive task information through message notifications.
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 about how to obtain the project name, see Create a project. |
test-project |
| CredentialConfig | CredentialConfig |
No |
Leave this parameter empty unless otherwise required. The chain authorization configuration. This parameter is optional. For more information, see Use chain authorization to access resources of other entities. |
|
| Password |
string |
No |
The password of the encrypted archive. |
123456 |
| UserData |
string |
No |
The custom user data. This data is returned in asynchronous message notifications to help you associate and process the notifications in your system. The maximum length is 2,048 bytes. |
test-data |
| SelectedFiles |
array |
No |
The list of files to extract. If this parameter is empty, the entire archive is extracted. Default value: empty. |
|
|
string |
No |
The name of the file to extract. The value is the relative path of the file from the root directory of the archive. |
test-dir/test.jpg |
|
| SourceURI |
string |
Yes |
The OSS URL of the archive. The OSS URL format is oss://${Bucket}/${Object}. |
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 does not support specifying a callback URL for API callbacks. Use MNS. |
|
| TargetURI |
string |
No |
The destination OSS URL for the extracted files. The selected files or the entire archive are extracted to this URL. The OSS URL format is oss://${Bucket}/${Object}. |
oss://test-bucket/test-dir/ |
To obtain detailed decompression information when you create a decompression task, set the ExtendedMessageURI parameter in Notification. The structure of the information contained in the file is as follows:
{
"Password" : "The password of the archive",
"IsEncryption": "true/false. Specifies whether the archive is encrypted.",
"ArchiveFiles": [
{
"URI": "The URL of the extracted file, such as oss://test-bucket/test-dir/test.txt",
"PathName": "The relative path of the file from the archive, such as ./test.txt",
"Reason": "The reason why the file preview failed, if the preview fails",
"IsFolder": "true/false. Specifies whether the file is a folder.",
"PackedSize": "The size of the file in the archive",
"UnPackedSize": "The size of the extracted file",
"FileAccessTime": "The time information of the file",
},
{
"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 |
The 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.