HeadContainer
  • PDF

HeadContainer

  • PDF

Overview

Gets metadata of a container (bucket).

Caution

The sub accounts can use it through the external API Gateway dedicated to sub accounts.
Please refer to the sub accounts for more information.

Syntax

HEAD /v1/AUTH_{project_id}/{container}

Request

Name In Type Description
project_id path string Project ID
container (Optional) path string Container (bucket) name
X-Auth-Token (Optional) header string Token
X-Newest (Optional) header boolean If it is true, the API request queries all copies and responds with the information of the latest copy. If this header is not specified, the API request returns the information that it can respond most quickly with.

Response

Name In Type Description
X-Container-Meta-name header string Metadata of the container (bucket). The name part in the header name functions as a key of the metadata.
Content-Length header string Length of the response result (in bytes)
X-Container-Object-Count header integer Number of objects in the container (bucket)
X-Container-Bytes-Used header integer Total size used by the container (bucket) in bytes
X-Container-Read (Optional) header string READ ACL of the container
X-Container-Write (Optional) header string WRITE ACL of the container
X-Container-Meta-Quota-Bytes (Optional) header string Storage limit of the container (bucket) in bytes
X-Container-Meta-Quota-Count (Optional) header string Maximum number of objects in the container (bucket)
X-Container-Meta-Access-Control-Allow-Origin (Optional) header string CORS
X-Container-Meta-Access-Control-Max-Age (Optional) header string CORS
X-Container-Meta-Access-Control-Expose-Headers (Optional) header string CORS
X-Container-Meta-Temp-URL-Key (Optional) header string Secret key for the temporary URL
X-Container-Meta-Temp-URL-Key-2 (Optional) header string Second secret key for the temporary URL
X-Timestamp header integer The time when the container (bucket) was created (in UNIX Time)
X-Container-Sync-Key (Optional) header string Not supported
X-Container-Sync-To (Optional) header string Not supported
Date header string Response time of the request (in UTC)
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)
Content-Type (Optional) header string MIME type of the response result
X-Versions-Location (Optional) header string Not supported
X-History-Location (Optional) header string Not supported

Examples

Request example (Get container metadata)

curl -i -X HEAD -H "X-Auth-Token: $token" https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/{container}

Response example

HTTP/1.1 204 No Content
Content-Length: 0
X-Container-Object-Count: 3
X-Timestamp: 1536631895.01856
Accept-Ranges: bytes
Last-Modified: Tue, 11 Sep 2018 02:11:36 GMT
X-Container-Bytes-Used: 630036
Content-Type: text/plain; charset=utf-8
X-Trans-Id: tx51f8478e8e924403851a4-005b988014
X-Openstack-Request-Id: tx51f8478e8e924403851a4-005b988014
Date: Wed, 12 Sep 2018 02:55:16 GMT

It returns No Content (204) status code if successful.


Was this article helpful?

What's Next