You need to enable JavaScript to run this app.
Torch Object Storage

Torch Object Storage

Copy page
Download PDF
Object ACL
PutObjectACL
Copy page
Download PDF
PutObjectACL
Introduction​
This API is used to set object ACL permissions. You can set the ACL during object upload and modify the ACL after object upload using this API. This API sets the ACL for the current version of an object by default. Include a versionId to set the ACL for a specific version of the object.​
Request syntax​
​
PUT /ObjectName?acl HTTP/1.1​
Host: bucketname.tos-cn-beijing.volces.com​
Date: GMT Date​
Authorization: authorization string​
​
{ ​
"Owner": { "ID": "test-cid" },​
"Grants": [{​
"Grantee": {​
"Type": "CanonicalUser",​
"ID": "test-cid"​
},​
"Permission": "FULL_CONTROL"​
}]​
}​
​
Request parameters and headers​
For common request headers, see Common parameters.​
​
Name​
Location​
Type​
Required​
Sample value​
Description​
acl​
Query​
String​
Yes​
-​
Identifies a PutObjectACL request.​
x-tos-acl​
Header​
String​
No​
private​
Object ACL setting. Valid values:​
  • private: Private permission.​
  • public-read: Publicly readable.​
  • public-read-write: Publicly readable and writable.​
  • authenticated-read: Authenticated users have read access.​
  • bucket-owner-read: The bucket owner has read access.​
  • bucket-owner-full-control: The bucket owner has full control.​
  • bucket-owner-entrusted: Controlled by the bucket policy, with the bucket owner having full control.​
  • default: Inherit bucket ACL, that is, the ACL policy of the object remains consistent with the bucket ACL policy.​
versionId​
Query​
String​
No​
57AF1A32CECB56721267​
Version ID of the object. Use this to modify the ACL of a specific version of the object.​
​
Request body elements​
​
Name​
Type​
Description​
Grants​
Array​
Root node for object access control permissions.​
Grantee​
Object​
Authorized user. Parent node: Grants.​
Type​
String​
User type. Parent node: Grantee.​
Canned​
String​
Use this property when Type is Group. Valid values:​
  • AllUsers: All users.​
  • AuthenticatedUsers: Some users that have been authorized based on the account ID.​
Parent node: Grantee.​
ID​
String​
Specifies the account ID of the authorized user when Type is CanonicalUser. Parent node: Grantee.​
Permission​
String​
Permission type. Parent node: Grants.​
Owner​
Object​
Object owner.​
ID​
String​
Account ID. Parent node: Owner.​
IsDefault​
Bool​
Whether to set the ACL of the object to inherit the bucket's ACL, meaning the ACL policies of the object and the bucket remain consistent.​
  • true: Set the ACL of the object to inherit the bucket's ACL.​
  • false: If no ACL is set for an object to inherit the bucket ACL, the object's ACL defaults to private.​
The default value is false.​
tip​
The Owner and BucketAclDelivered parameters must be set together and do not support setting the Grantee parameter simultaneously.​
​
Response headers​
The response contains only common headers.​
Response body elements​
No elements are used.​
Sample request​
​
PUT /ObjectName?acl HTTP/1.1​
Host: bucketname.tos-cn-beijing.volces.com​
Date: Fri, 30 Jul 2021 13:59:18 GMT​
Authorization: authorization string​
​
{​
"Owner": {​
"ID": "AccountID"​
},​
"Grants": [​
{​
"Grantee": {​
"ID": "test-cid",​
"Type": "CanonicalUser"​
},​
"Permission": "FULL_CONTROL"​
}​
]​
}​
​
Sample response​
​
HTTP/1.1 200 OK​
x-tos-id-2: 4fac130beeb50032-a444ed0​
x-tos-request-id: 4fac130beeb50032-a444ed0​
Date: Fri, 30 Jul 2021 13:59:18 GMT​
server: TosServer​
Content-Length: 0​
​
​
Last updated: 2026.08.12 17:30:26