CreateArchiveFileInspectionTask
Creates an archive preview and parsing task to retrieve the list of files in an archive without decompressing it.
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 calling 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: The maximum size is 200 GB for ZIP and RAR formats, and 50 GB for 7z format.
-
This API operation is asynchronous. After a task starts, the task information is retained for only 7 days and cannot be retrieved after this period. 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:CreateArchiveFileInspectionTask |
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 to compress the file. If the file is encrypted and compressed, you must provide the password to view the information in the compressed file. |
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 |
| SourceURI |
string |
No |
The storage location of the archive. The OSS address format is oss://${Bucket}/${Object}, where |
oss://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
Currently, Intelligent Media Management does not support specifying a callback URL for API call callbacks. Use MNS. |
To create an archive preview and parsing task, set the
ExtendedMessageURIparameter inNotificationto retrieve the list of files in the archive. The generated archive file list information is as follows:
{
"Password" : "The password of the archive",
"IsEncryption": "true/false. Specifies whether the archive is encrypted",
"ArchiveFiles": [
{
"PathName": "The path of the file relative to the archive, such as ./test-dir/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 file after decompression",
"FileAccessTime": "The time information of the file",
},
{
"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.