Get a bucket or object policy
Get the policy of a bucket or object.
Capabilities
`buckets=read`
Syntax
GET /admin/bucket?policy&format=json HTTP/1.1
Host FULLY_QUALIFIED_DOMAIN_NAME
Request Parameters
bucket
- Description
-
The bucket to read the policy from.
- Type
-
String
- Example
-
foo_bucket - Required
-
Yes
object
- Description
-
The object to read the policy from.
- Type
-
String
- Example
-
foo.txt - Required
- No
Response Entities
policy
- Description
-
Access control policy.
- Type
-
Container
- Parent
-
N/A
If successful, returns the object or bucket policy.
Special Error Responses
IncompleteBody
- Description
-
Either bucket was not specified for a bucket policy request or bucket and object were not specified for an object policy request.
- Code
-
400 Bad Request