Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: zhangyue <zhangyue164@huawei.com> Co-committed-by: zhangyue <zhangyue164@huawei.com>
12 KiB
Request
Method
Method |
URI |
Description |
---|---|---|
COPY |
/v1/{account}/{container}/{object} |
Copies an object to another object in OBS (compatible with OpenStack Swift). |
{account} indicates the name of an account.
{container} indicates the name of a container.
{object} indicates the name of an object.
This operation does not involve a request body.
Example Request
Copy the goodbye object from the marktwain container to the janeausten container:
curl -i $publicURL/marktwain/goodbye -X COPY -H "X-Auth-Token: $token" -H "Destination: janeausten/goodbye"
curl -i $publicURL/janeausten/goodbye -X PUT -H "X-Auth-Token: $token" -H "X-Copy-From: /marktwain/goodbye" -H "Content-Length: 0"
Request Query Parameters
This operation does not include request query parameters.
Request Headers
Request URI parameters
Parameter |
Type |
Description |
---|---|---|
{account} |
String (Required) |
A unique account name. In the current version, it indicates a unique ID for the account. |
{container} |
String (Required) |
A unique container name. For details about container naming rules, see Naming Rules. |
{object} |
String (Required) |
An object name. For details about object naming rules, see Object Naming Rules. |
Header |
Type |
Description |
---|---|---|
X-Auth-Token |
String (Required) |
Authentication token. If you omit this header, your request fails unless the account owner has granted you access through an ACL. |
Destination |
String (Required) |
The container and object name of the destination object in the /container/object format. |
X-Object-Meta-name |
String (Optional) |
Object metadata, where {name} is the name of the metadata item. You must specify an X-Object-Meta-{name} header for each metadata item (for each {name}) that you want to add or update. |
Content-Type |
String (Optional) |
Sets the MIME type of the object. |
Content-Length |
String (Optional) |
Object length. |
Content-Disposition |
String (Optional) |
When the header is set to {newname} and an object is downloaded through a browser, the default object name {newname} is returned. |
Content-Encoding |
String (Optional) |
If this header is set, the value is the encoding format used when an object is downloaded through a browser. |
X-Copy-From |
String (Optional) |
Container and object name of the source object in the /container/object format. |