PostContainer

Prev Next

Available in Classic and VPC

Set or change metadata on a container (bucket).

Note

Sub accounts can use it through the external API Gateway dedicated to sub accounts.
For more information, see the PostContainer API of Sub Account.

Requests

The following describes the request format for the endpoint. The request format is as follows.

Method URI
POST /v1/AUTH_{project_id}/{container}

Request headers

The following describes the headers.

Field Type Required Description
X-Auth-Token String Optional Value of the issued token
X-Container-Read String Optional READ ACL (access permissions) of the container (bucket)
X-Container-Write String Optional WRITE ACL (access permissions) of the container (bucket)
X-Container-Sync-Key String Optional Not used
X-Container-Sync-To String Optional Not used
X-Versions-Location String Optional Not used
X-History-Location String Optional Not used
X-Remove-Versions-Location String Optional Not used
X-Remove-History-Location String Optional Not used
X-Container-Meta-name String Optional Metadata for the container (bucket)
  • The name part of the header name acts as a key for metadata
  • It can be added, updated, or deleted, with deletion requested as an empty value
X-Remove-Container-Meta-name String Optional Delete metadata for the container (bucket)
  • The name part of the header name acts as a key for metadata
  • X-Remove-Container-Read or X-Remove-Container-Meta-name
X-Container-Meta-Access-Control-Allow-Origin String Optional CORS setting
  • Accessible source domain
X-Container-Meta-Access-Control-Max-Age String Optional CORS setting (in seconds)
  • Maximum time to cache results
X-Container-Meta-Access-Control-Expose-Headers String Optional CORS setting
  • Header that is not visible but allows access
X-Container-Meta-Quota-Bytes String Optional Capacity limit of the container (bucket)
X-Container-Meta-Quota-Count String Optional Limit for number of objects in the container (bucket)
X-Container-Meta-Temp-URL-Key String Optional Secret key value for the temporary URL
X-Container-Meta-Temp-URL-Key-2 String Optional Second secret key value for the temporary URL

Request path parameters

The following describes the parameters.

Field Type Required Description
project_id String Required Project ID
container String Required Name of the container (bucket) to set or edit

Request example

The following is a sample request.

Request container metadata creation

The following is a sample request of creating metadata of a container.

curl -X POST "https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/{container}" 
-H "X-Auth-Token: $token"
-H "X-Container-Meta-{name}: $container-metadata-string"

Request container metadata update

The following is a sample request of updating metadata of a container.

curl -X POST "https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}" 
-H "X-Auth-Token: $token"
-H "X-Container-Meta-{name}: $container-metadata-string"

Request container metadata deletion

The following is a sample request of deleting metadata of a container.

curl -X POST "https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}" 
-H "X-Auth-Token: $token"
-H "X-Remove-Container-Meta-{name}: $container-metadata-string"

Responses

The following describes the response format.

Response headers

For response headers common to all Archive Storage APIs, see Archive Storage common response headers.

Response example

The following is a sample response.

Response when requesting creation of container metadata

The following is a sample response when requesting to create metadata for a container.

HTTP/1.1 204 No Content
Content-Length: 0
Content-Type: text/html; charset=UTF-8
X-Trans-Id: txefe14b178c56469b8576f-005b987d66
X-Openstack-Request-Id: txefe14b178c56469b8576f-005b987d66
Date: Wed, 12 Sep 2018 02:43:50 GMT

Response when requesting update of container metadata

The following is a sample response when requesting to update metadata for a container.

HTTP/1.1 204 No Content
Content-Length: 0
Content-Type: text/html; charset=UTF-8
X-Trans-Id: tx66932a917b854a458544a-005b987d78
X-Openstack-Request-Id: tx66932a917b854a458544a-005b987d78
Date: Wed, 12 Sep 2018 02:44:08 GMT

Response when requesting deletion of container metadata

The following is a sample response when requesting to delete metadata for a container.

HTTP/1.1 204 No Content
Content-Length: 0
Content-Type: text/html; charset=UTF-8
X-Trans-Id: tx590d9493661147e780d99-005b987df5
X-Openstack-Request-Id: tx590d9493661147e780d99-005b987df5
Date: Wed, 12 Sep 2018 02:46:13 GMT