Querying the ACL of an Object

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

Description

The GET Object acl API is used to retrieve the access permissions for a specific object under a particular bucket, with access only granted to the bucket owner.

Request

Request Example

GET /<ObjectKey>?acl HTTP/1.1
Host: <BucketName-APPID>.<Endpoint>
Date: GMT Date
Authorization: Auth String

Note:

Authorization: Auth String (For more details, please refer to Request Signature documentation).

Request Header

Common Headers

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

Non-common Headers

Required headers:
This request is implemented by using the following required headers.

Name Description Type Required
Authorization Signature String String Yes

Request Body

The request body of this request is empty.

Response

Response Headers

Common Response Headers

This response uses 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 returns application/xml data. The following contains all the nodes:

<AccessControlPolicy>
  <Owner>
    <ID>qcs::cam::uin/100000000001:uin/100000000001</ID>
    <DisplayName>qcs::cam::uin/100000000001:uin/100000000001</DisplayName>
  </Owner>
  <AccessControlList>
    <Grant>
      <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser">
        <ID>qcs::cam::uin/100000000001:uin/100000000001</ID>
        <DisplayName>qcs::cam::uin/100000000001:uin/100000000001</DisplayName>
      </Grantee>
      <Permission>FULL_CONTROL</Permission>
    </Grant>
    <Grant>
      <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser">
        <ID>qcs::cam::uin/100000000002:uin/100000000002</ID>
        <DisplayName>qcs::cam::uin/100000000002:uin/100000000002</DisplayName>
      </Grantee>
      <Permission>READ</Permission>
    </Grant>
  </AccessControlList>
</AccessControlPolicy>

The data are as follows:

Node Name (Keyword) Parent Node Description Type
AccessControlPolicy No Container for storing the results of the GET Object ACL Container

Content of AccessControlPolicy:

Node Name (Keyword) Parent Node Description Type
Owner AccessControlPolicy Object Owner Information Container
AccessControlList AccessControlPolicy Information about the grantee and permissions Container

Content of Owner:

Node Name (Keyword) Parent Node Description Type
ID AccessControlPolicy.Owner Object Owner ID,
Formatted as: qcs::cam::uin/:uin/. If it's the root account, and have the same value.
String
DisplayName AccessControlPolicy.Owner Object Owner's Name String

Content of AccessControlList:

Node Name (Keyword) Parent Node Description Type
Grant AccessControlPolicy.AccessControlList Authorization information for a single object. An AccessControlList can have up to 100 Grant entries. Container

Contents of Grant:

Node Name (Keyword) Parent Node Description Type
Grantee AccessControlPolicy.AccessControlList.Grant Grantee Information. The type can be RootAccount or Subaccount. When the type is RootAccount, the ID specifies the root account; when the type is Subaccount, the ID specifies the sub-account. Container
Permission AccessControlPolicy.AccessControlList.Grant Specifies the permissions granted to the grantee, with enum values: READ, FULL_CONTROL. String

Contents of Grantee:

Node Name (Keyword) Parent Node Description Type
URI AccessControlPolicy.AccessControlList.Grant.Grantee Specifies all users. String
ID AccessControlPolicy.AccessControlList.Grant.Grantee User ID, formatted as: qcs::cam::uin/:uin/. If it is a root account, and have the same value. String
DisplayName AccessControlPolicy.AccessControlList.Grant.Grantee User name String

Practical Case

Request

GET /exampleobject?acl HTTP/1.1
Host: <BucketName-APPID>.<Endpoint>
Date: Fri, 10 Mar 2016 09:45:46 GMT
Authorization: q-sign-algorithm=sha1&q-ak=AKIDxxxxxxxxxxxxx&q-sign-time=1484213027;32557109027&q-key-time=1484213027;32557109027&q-header-list=host&q-url-param-list=acl&q-signature=dcc1eb2022b79cb2a780bf062d3a40e120b4065

Response

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 266
Connection: keep-alive
Date: Fri, 10 Mar 2016 09:45:46 GMT

x-cos-request-id: NTg3NzRiMjVfYmRjMzVfMTViMl82ZGZmNw==

<AccessControlPolicy>
  <Owner>
    <ID>qcs::cam::uin/100000000001:uin/100000000001</ID>
    <DisplayName>qcs::cam::uin/100000000001:uin/100000000001</DisplayName>
  </Owner>
  <AccessControlList>
    <Grant>
      <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser">
        <ID>qcs::cam::uin/100000000001:uin/100000000001</ID>
        <DisplayName>qcs::cam::uin/100000000001:uin/100000000001</DisplayName>
      </Grantee>
      <Permission>FULL_CONTROL</Permission>
    </Grant>
    <Grant>
      <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser">
        <ID>qcs::cam::uin/100000000002:uin/100000000002</ID>
        <DisplayName>qcs::cam::uin/100000000002:uin/100000000002</DisplayName>
      </Grantee>
      <Permission>READ</Permission>
    </Grant>
  </AccessControlList>
</AccessControlPolicy>