Uncompress zip package

Last update:2022-03-01 18:22:24

Description

This interface provides the function of decompressing the compressed package on the cloud storage platform. After decompression, a list file is generated on the cloud storage by default, and the file content contains the decompressed file information.

Request Description

POST /fops
Host: <MgrDomain>
Authorization: <accessToken>

Manage credential parameters

<path>:/fops
<body>:<RequestParams>, (ie. Request Content ) 

Header Description

Parameter Required Description
Host Yes Management domain name , which can be obtained in the user management interface
Authorization Yes Management Credential

Parameter Description

Request parameters are organized in the following format and submitted as request content:

bucket=<Urlsafe_Base64_Encoded_Bucket>&key=<Urlsafe_Base64_Encoded_Key>&fops=<Urlsafe_Base64_Encoded_Fops>&notifyURL=<Urlsafe_Base64_Encoded_PersistentNotifyUrl>&force=<Force>&separate=<Separate>
Parameter Required Description
bucket Yes space name.
key Yes File name, specifying the compressed file to be decompressed.
fops Yes Process the parameter list. For the meaning of the parameters, please refer to the decompression Ops parameter format . Multiple processing requests are supported at the same time, and the parameter lists are separated by ;.
notifyURL no For the notification receiving URL of the processing result, please refer to the Description of the notification data content .
force no Mandatory data processing. When the server finds that the data processing result specified by fops already exists, it considers that it has been processed successfully to avoid wasting resources by repeated processing. Add this field and set it to 1 to force data processing and overwrite the original result. The default value is 0.
separate no Whether or not to separate notification options for transcoding. Set 1 and 0 as option codes: 1: Indicates that notifyURL is notified after each transcoding instruction is executed. 0: Indicates that notifyURL is notified at one time after all transcoding Description are executed. The default value is 0.

Response Description

If the request is successful, a JSONstring with the following content is returned:

{ "persistentId": <persistentId> }
Field name Required Description
persistentId Yes The process ID of upload preprocessing or trigger persistence processing

If the request fails, a JSONstring with the following content is returned:

{
    "code":     "<code string>",
    "message":  "<ErrMsg string>"
}
Field name Required Description
code Yes HTTP request response code, see HTTP response status code
message Yes Prompt message when file decompression processing fails

Note:
After the decompression is successful, a list file will be generated in the corresponding space directory. The default file name is: random number + timestamp + compressed package name.list.

The file content format is as follows:

url \t  key \t  status
parameter type Description
url string The access path of the specific file.
key string Key is the location information that identifies the resource stored in the cloud. It is formed by splicing the space name and the file name. The spliced string is “:” Example: video:1.txt, the space name is video, and the file name is 1.txt.
status int Status code, 0 means new file, 1 means overwrite original file, 2 means reserved file, 3 means decompression exception, -1 means failed to save the decompressed file.

Example

curl -v -X POST -d "bucket=aW1hZ2Vz&key=dGVzdC56aXA&fops = ZGVjb21wcmVzc2lvbi96aXA=&force=1&separate=0" -H "Authorization: 86622e227a50d49d858c2494a935bc2e4ac543a7: NmNlYmI5YzczMjlkN2MxYTYxNWYyMjE4MDMxZTVjMWQ3ZjlkZTVmOA ==" --url "http://mgrDomain/fops"
Is the content of this document helpful to you?
Yes
I have suggestion
Submitted successfully! Thank you very much for your feedback, we will continue to strive to do better!