Creates a task to inspect a compressed file and retrieve a list of its contents without decompressing the file.
Operation description
This API is in public preview. If you have any questions, join the DingTalk group to provide feedback. For the DingTalk group number, see Contact us.
-
Before using this API, make sure you understand the billing methods and pricing of Intelligent Media Management (IMM).
Important The completion time of asynchronous tasks is not guaranteed. -
File count limit: A compressed file can contain a maximum of 80,000 files.
-
File size limit: The maximum size is 200 GB for ZIP and RAR files, and 50 GB for 7z files.
-
This is an asynchronous API. Task information is saved for 7 days after a task starts and is then deleted. To view the task information, call the GetTask or ListTasks operation with the returned
TaskId. You can also set the Notification parameter to receive task information through notification messages.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
imm:CreateArchiveFileInspectionTask |
create |
*Project
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectName |
string |
Yes |
The project name. For more information, see Create a project. |
test-project |
| CredentialConfig | CredentialConfig |
No |
Leave this parameter empty if you do not have special requirements. The configuration for chained authorization. This parameter is not required. For more information, see Use chained authorization to access resources of other entities. |
|
| Password |
string |
No |
The password of the compressed file. If the file is encrypted, provide the password to inspect its contents. |
123456 |
| UserData |
string |
No |
Custom information that is returned in the asynchronous notification message. You can use this information to associate the notification message with your services. The maximum length is 2,048 bytes. |
test-data |
| SourceURI |
string |
No |
The location of the compressed file. The Object Storage Service (OSS) URI must be in the oss://${Bucket}/${Object} format. In this format, |
oss://bucket/test-object.zip |
| Notification | Notification |
No |
The notification configuration. For more information, see Notification. For the format of asynchronous notification messages, see Asynchronous notification message format. Note
Currently, API callbacks in IMM do not support custom webhook addresses. Use MNS instead. |
To retrieve the list of files in the compressed file, set the
ExtendedMessageURIparameter inNotification. The generated file list is structured as follows:
{
"Password" : "The password of the compressed file",
"IsEncryption": "true/false, specifies whether the compressed file is encrypted",
"ArchiveFiles": [
{
"PathName": "The path of the file relative to the compressed file. Example: ./test-dir/test.txt",
"Reason": "If the inspection fails, the reason for the failure.",
"IsFolder": "true/false, specifies whether the entry is a folder",
"PackedSize": "The size of the file within the compressed file",
"UnPackedSize": "The size of the file after decompression",
"FileAccessTime": "The file access time.",
},
{
"PathName": "./test-dir/",
"Reason": "",
"IsFolder": "true",
"PackedSize": "0",
"UnPackedSize": "0",
"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. |
ArchiveFileInspection-8475218e-d86e-4c66-b3cf-50e74d6c**** |
Examples
Success response
JSON format
{
"RequestId": "EC564A9A-BA5C-4499-A087-D9B9E76E*****",
"EventId": "0ED-1Bz8z71k5TtsUejT4UJ16Es*****",
"TaskId": "ArchiveFileInspection-8475218e-d86e-4c66-b3cf-50e74d6c****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.