HeadContainer

Prev Next

Available in Classic and VPC

View the metadata of a container (bucket).

Note

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

Requests

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

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

Request headers

The following describes the headers.

Field Type Required Description
X-Auth-Token String Required Value of the issued token
X-Newest Boolean Optional Set whether to respond with information from the most recent replica
  • true | false
    • true: Query all replicas and respond with information from the most recent replica
  • If the header is omitted, respond with the fastest information available

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 view

Request example

The following is a sample request.

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

Responses

The following describes the response format.

Response headers

The following describes the headers.

Field Type Required Description
Content-Type String - MIME type of the response result
Content-Length String - Length of the response result (bytes)
X-Container-Object-Count Integer - Total number of objects in the container (bucket)
X-Container-Bytes-Used Integer - Total capacity size used by the container (bucket) (bytes)
X-Timestamp Integer - Creation time of the container (bucket) (Unix timestamp)
X-Container-Read String - READ ACL (access permissions) of the container (bucket)
X-Container-Write String - WRITE ACL (access permissions) of the container (bucket)
Last-Modified String - Most recent modification time (UTC) of the container
Accept-Ranges String - Range types allowed by the container (bucket)
X-Storage-Policy String - Storage policy value of the container (bucket)
X-Trans-Id String - Transaction ID of the request
X-Openstack-Request-Id String - Transaction ID of the request
  • Identical to X-Trans-Id
X-Container-Meta-name String - Metadata of the container (bucket)
  • The name part of the header name acts as a key for metadata
X-Container-Meta-Quota-Count String - Limit for number of objects in the container (bucket)
X-Container-Meta-Quota-Bytes String - Capacity limit of the container (bucket)
X-Container-Meta-Access-Control-Allow-Origin String - CORS settings
  • Entered accessible domains
X-Container-Meta-Access-Control-Max-Age String - CORS settings
  • Maximum time (in seconds) for caching entered results
X-Container-Meta-Access-Control-Expose-Headers String - CORS settings
  • Entered accessible headers
X-Container-Meta-Temp-URL-Key String - Secret key value for the temporary URL
X-Container-Meta-Temp-URL-Key-2 String - Second secret key value for the temporary URL
X-Container-Sync-Key String - Not used
X-Container-Sync-To String - Not used
X-Versions-Location String - Not used
X-History-Location String - Not used
Date String - Response time of the request (UTC)

Response example

The following is a sample response.

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