최신 업데이트:2022-10-14 15:24:40
This interface is an asynchronous interface, which can batch modify the retention period of all files in the specified space or files in the specified directory
Note: The retention period of the same file is set by overwriting.
POST /fmgr/setdeadline
Host:<MgrDomain>
Authorization:<AccessToken>
Parameter | Required | Description |
---|---|---|
HOST | Yes | Management domain name , which can be obtained in the user management interface |
Authorization | Yes | Manage Credentials |
Request parameters are organized in the following format and submitted as request content:
fops =bucket/<Urlsafe_Base64_Encoded_Bucket>/deadline/<deadline>;bucket/<Urlsafe_Base64_Encoded_Bucket>/prefix/<Urlsafe_Base64_Encoded_prefix>/deadline/<deadline>¬ifyURL=<Urlsafe_Base64_Encoded_notifyUrl>&separate=<Separate>
Parameter | Required | Description |
---|---|---|
fops | Yes | Processing parameter list, the format is the above Description, supports multiple processing requests at the same time, and the parameter lists are separated by ; |
bucket | Yes | Specifies the space name; <Urlsafe_Base64_Encoded_bucket> is the URL-safe Base64-encoded string for the specified bucket name |
prefix | no | The specified prefix, that is, the directory name <Urlsafe_Base64_Encoded_prefix> is a string that is URL-safe Base64-encoded for the specified prefix. Note: 1. When the prefix is not empty, it means that it is valid for all files in the directory. When the prefix is empty, it means that it is valid for all files in the specified space. 2. Fuzzy matching is not supported. If the specified prefix is test, the resource whose key prefix is test123 will not take effect. |
deadline | Yes | File retention period. Files that have been saved for more than a few days are automatically deleted, unit: days. For example: 1, 2, 3… Note: 0 means delete as soon as possible, -1 means cancel the expiration time and save it permanently |
notifyURL | no | Processing result notification receiving URL |
fops=bucket/bXlidWNrZXQ=/prefix/YWFjLw==/deadline/10;bucket/bXlidWNrZXQ=/prefix/YWFiLw==/deadline/30¬ifyURL=aHR0cDovL3Rlc3QuY29tL25vdGlmeVVSbA==&separate=1
If the request is successful, it returns a Json string with the following content:
{ "persistentId": <persistentId> }
Parameter | Description |
---|---|
persistentId | The task process ID, which can be used to query the task progress |
If the request fails, a Json string with the following content is returned:
{
"code": "<code string>",
"message": "<ErrMsg string>"
}
Field name | Description |
---|---|
code | HTTP request response code, see HTTP response status code |
message | Request failed message |
curl -v -X POST -d "fops=bucket/bXlidWNrZXQ=/prefix/YWFjLw==/deadline/10;bucket/bXlidWNrZXQ=/prefix/YWFiLw==/deadline/30¬ifyURL=aHR0cDovL3Rlc3QuY29tL25vdGlmeVVSbA==&separate=1" -H "Authorization:86622e227a50d49d858c2494a935bc2e4ac543a7:Y2JmMGY0YTNhZmQxZmVlZGM2ZTA0YTdjNTcyOWQ1NjRkNTExYjg0Yg==" --url "http://mgrDomain/fmgr/setdeadline"