GET Object ACL

The implementation of a GET Object ACL operation returns the ACL of an object. You can perform this operation to view the ACL of an object, as long as you have the READ_ACP permission for the object.

Versioning

By default, the ACL of the object of the latest version is obtained. If the object of the latest version has a deletion marker, 404 is returned. You can specify versionId to obtain the ACL of an object of the desired version.

Request Syntax

GET /ObjectName?acl HTTP/1.1
Host: bucketname.obs.cn-north-1.myhwclouds.com
Date: date
Authorization: authorization

Request Parameters

This request uses parameters to specify the object ACL to be obtained. Table 1 describes the parameters.

Table 1 Request parameters

Parameter

Description

Required or Optional

acl

Indicates that the object ACL to be obtained.

Type: string

Required

versionId

Indicates the version ID of the specified object.

Type: string

Optional

Request Headers

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

Request Elements

This request involves no elements.

Response Syntax

HTTP/1.1 status_code
Date: date
Content-Length: length
Content-Type: application/xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AccessControlPolicy xmlns="http://obs.cn-north-1.myhwclouds.com/doc/2015-06-30/">
    <Owner>
        <ID>id</ID>
        <DisplayName>name</DisplayName>
    </Owner>
    <AccessControlList>
        <Grant>
            <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser">
                <ID>id</ID>
                <DisplayName>name</DisplayName>
            </Grantee>
            <Permission>permission</Permission>
        </Grant>
    </AccessControlList>
</AccessControlPolicy>

Response Headers

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

In addition to common headers, you may use the response header provided in Table 2.

Table 2 Additional response header

Header

Description

x-amz-version-id

Indicates the version ID of the specified object.

Type: string

Default: none

Response Elements

This response contains elements to specify the returned object ACL. Table 3 describes the elements.

Table 3 Response elements

Element

Description

DisplayName

Indicates the username.

Type: string

ID

Indicates the domain ID of the user.

Type: string

AccessControlList

Indicates the ACL that records all users who have permission to access the bucket.

Type: XML

Grant

Indicates the container for the grantee and its permission.

Type: XML

Grantee

Indicates the container for the details about the grantee.

Type: XML

Permission

Indicates the grantee's permission for an object.

Type: string

Error Responses

No special error responses are returned. For details about error responses, see Table 1.

Registration