Retrieving Buckets and Their Permissions

Last Updated At: 2025-10-21 09:10:00

Description

HEAD Bucket is used to verify whether a bucket exists and whether you have permission to access it. The access permission for HEAD is identical to read permission. Possible results are as follows:

  • If the bucket exists and you have permission to read it, HTTP status code 200 will be returned.
  • If you do not have permission to read the bucket, HTTP status code 403 will be returned.
  • If the bucket does not exist, HTTP status code 404 will be returned.

    Note:

    Currently, we do not have a public API for getting Bucket attributes (returning information such as acl).

Request

Request Example

HEAD / HTTP/1.1
Host: <BucketName-APPID>.<Endpoint>
Date: GMT Date
Authorization: Auth String

Note:

Authorization: Auth String (See Request Signature for details.)

Request Header

Common Headers

This request uses common request headers. For details, see Common Request Headers.

Non-common Headers

This request has no special request header information.

Request Body

The request does not have a request body.

Response

Response Headers

Common Response Headers

This response contains common response headers. For details, see Common Response Headers.

Special Response Headers

There are no special response headers for this response operation.

Response Body

The response body is empty.

Practical Case

Request

HEAD / HTTP/1.1
Host: <BucketName-APPID>.<Endpoint>
Date: Thu, 27 Oct 2015 20:32:00 GMT
Authorization: q-sign-algorithm=sha1&q-ak=AKIDxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&q-sign-time=1484640517;32557536517&q-key-time=1484640517;32557536517&q-header-list=host&q-url-param-list=&q-signature=7bedc2f84a0a3d29df85fe727d0c1e388c410376

Response

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 0
Date: Thu, 27 Oct 2015 20:32:00 GMT
x-cos-request-id: NTg3ZGQxNDNfNDUyMDRlXzUyOWNfMjY5