Brief Introduction
Product Introduction
User Guide (Dash)
API
Overview
restV1
Term Description
Security Mechanism
Upload
Resource Management
List Bucket
Obtain Bucket Stat
Download Files
Delete Files
Uncompress zip package
Get File Info
List Resources
Fetch Resource
Move Resource
Copy Resource
Set File Retention Period
Convert Storage Classes
Restore Object
Advanced Resource Management
Appendix
SDK
restV2
Tools
Tutorials

Copy Resource

更新时间:2022-10-14 15:24:34

Copy resources

Description

This interface provides copying the specified resource as a newly named resource on the cloud storage platform. If a resource with the same name exists in the target space, the old file will be overwritten directly.

Note: If the m3u8 file is copied, the ts file will not be copied at the same time.

Request Description

POST /copy/{param_src}/{param_dst}
Host: <MgrDomain>
Authorization: <AccessToken>

Note: param_src is the source file of the copy operation; param_dst is the target file of the copy operation.

{param_src}and {param_dst}generation rules refer to EncodeEntryURI format .

Header Description

Parameter Required Description
Host Yes The management domain name can be obtained on the user management interface.
Authorization Yes Manage credentials .

Response Description

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

{
    "message":   "OK",
    "code": 200
}
Field name Required Description
message Yes Prompt message for successful copying of files
code Yes The request returns the status code, see HTTP response status code

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 Error message when copying files failed

Example

curl -v -X POST -H "Authorization:86622e227a50d49d858c2494a935bc2e4ac543a7:OWE0M2UxMjMxZTg1NTJmMjdhYjk3ZDgyZDZkMmVhNWMxYzUzMGM0OQ==" --url "http://mgrDomain/copy/aW1hZ2VzOmdqaF9zeW4yLnR4dA==/aW1hZ2VzOmdqaF9zeW4yX2NvcHkudHh0"
本篇文档内容对您是否有帮助?
有帮助
我要反馈
提交成功!非常感谢您的反馈,我们会继续努力做到更好!