Last update:2022-10-14 15:24:36
This interface provides to copy the specified resource as a new named resource.
Note: If the m3u8 file is copied, the ts file will not be copied at the same time.
POST /fmgr/copy
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=resource/<EncodeEntryURI>/bucket/<Urlsafe_Base64_Encoded_bucket>/key/<Urlsafe_Base64_Encoded_key>/prefix/<Urlsafe_Base64_Encoded_prefix>¬ifyURL=<Urlsafe_Base64_Encoded_notifyUrl>&separate=<Separate>
Parameter | Required | Description |
---|---|---|
fops | Yes | The processing parameter list, the format is as Descriptiond above, and multiple processing requests are supported at the same time. The parameter lists are separated by ;. |
resource | Yes | Specify the space name and resource name. The format is: |
bucket | Yes | Specify storage space. <Urlsafe_Base64_Encoded_bucket> is the URL-safe Base64-encoded string for the specified bucket name. |
key | no | Specifies the key to store the resource. When copying files to the same space, please specify the key, which cannot be the same as the key of the source file. <Urlsafe_Base64_Encoded_key> is the URL-safe Base64-encoded string for the key of the specified resource. Note: Copy to a different space, if no key is specified, it will be named with the key of the original resource. |
prefix | no | Specifies the prefix for the resource key. <Urlsafe_Base64_Encoded_prefix> is a URL-safe Base64-encoded string for the prefix of the key of the specified resource. Note: When specifying the prefix parameter, the resource is finally saved as prefix/key . |
notifyURL | no | The processing result is notified of the receiving URL. For the format of the notification content, see the returned content of the task query interface . |
force | no | Whether to force processing. 1: Force data processing and overwrite the original result. 0: If the data processing result already exists, the processing is considered to be successful, and repeated processing is avoided to waste resources. The default value is 0. |
separate | no | Whether processing instructions are notified separately. Set 1 and 0 as option codes: 1: Indicates that notifyURL is notified after each command is executed. 0: Indicates that notifyURL is notified once after all commands are executed . The default value is 0. |
fops parameter example
fops=resource/bXlidWNrZXQ6YWEuanBn/bucket/bXlidWNrZXQy;resource/bXlidWNrZXQ6YWEuanBn/bucket/bXlidWNrZXQy/key/YWJjL2FhLmpwZw==/prefix/ZGlyYWEv¬ifyURL=aHR0cDovL3Rlc3QuY29tL25vdGlmeVVSbA==&separate=1
If the request is successful, a Json
string with the following content is returned:
{ "persistentId": <persistentId> }
Field name | Required | Description |
---|---|---|
persistentId | Yes | 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 | Required | Description |
---|---|---|
code | Yes | HTTP request response code, see HTTP response status code |
message | Yes | Request failed message |
curl -v -X POST -d "fops=resource/bXlidWNrZXQ6YWEuanBn/bucket/bXlidWNrZXQy;resource/bXlidWNrZXQ6YWEuanBn/bucket/bXlidWNrZXQy/key/YWJjL2FhLmpwZw==/prefix/ZGlyYWEv¬ifyURL=aHR0cDovL3Rlc3QuY29tL25vdGlmeVVSbA==&separate=1" -H "Authorization:86622e227a50d49d858c2494a935bc2e4ac543a7:Y2JmMGY0YTNhZmQxZmVlZGM2ZTA0YTdjNTcyOWQ1NjRkNTExYjg0Yg==" --url "http://mgrDomain/fmgr/copy"