CopyObject
- Print
- PDF
CopyObject
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
The latest service changes have not yet been reflected in this content. We will update the content as soon as possible. Please refer to the Korean version for information on the latest updates.
Overview
Copies objects from a different place.
Syntax
COPY /v1/AUTH_{project_id}/{container}/{object}
Request
Name | In | Type | Description |
---|---|---|---|
project_id | path | string | Project ID |
container | path | string | Container (bucket) name |
object | path | string | Object name |
multipart-manifest (Optional) | query | string | If multipart-manifest=get, the object is considered a large object (SLO). The manifest of the object is copied, instead of its contents. |
X-Auth-Token (Optional) | header | string | Token |
Content-Type (Optional) | header | string | MIME type of the object |
Content-Encoding (Optional) | header | string | Encoding type of the object |
Content-Disposition (Optional) | header | string | Redefines browser behaviors. |
X-Object-Meta-{name} (Optional) | header | string | Metadata of the object. The “name” part in the header name functions as a key of the metadata. You can add, update and delete metadata; leave this header empty to delete metadata. |
X-Fresh-Metadata (Optional) | header | boolean | If it is true, the API request only copies the object, without metadata. The default value is false. |
Response
Name | In | Type | Description |
---|---|---|---|
Content-Length | header | string | Length of the response result (in bytes) |
X-Copied-From-Last-Modified (Optional) | header | integer | last_modified header value of the source object |
X-Copied-From (Optional) | header | string | Path of the source object |
X-Copied-From-Account (Optional) | header | string | Account of the source object |
Last-Modified | header | string | The latest time when the copied object was updated (in UTC) |
ETag | header | string | ETag header value |
X-Trans-Id | header | string | Transaction ID of the request |
X-Openstack-Request-Id | header | string | Transaction ID of the request (same as X-Trans-Id) |
Date | header | string | Response time of the request (in UTC) |
Content-Type | header | string | MIME type of the response result |
Examples
Request example
curl -i -X COPY -H "X-Auth-Token: $token" -H "Destination: $copy_destination" https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/{container}/{object}
Response example
HTTP/1.1 201 Created
Last-Modified: Mon, 17 Sep 2018 08:21:36 GMT
Content-Length: 0
Etag: f1c9645dbc14efddc7d8a322685f26eb
Content-Type: text/html; charset=UTF-8
X-Copied-From-Account: AUTH_{project_id}
X-Copied-From-Last-Modified: Mon, 17 Sep 2018 07:43:40 GMT
X-Copied-From: ncloud-container-0/ncloud-object-0
X-Trans-Id: tx851b895d7fcf47f987a5a-005b9f640f
X-Openstack-Request-Id: tx851b895d7fcf47f987a5a-005b9f640f
Date: Mon, 17 Sep 2018 08:21:35 GMT
The API request copies the object.
It returns Created (201) status code if successful.
Was this article helpful?