Get Access Log Configuration for a Bucket
Updated at:2025-11-03
API description
This API retrieves the access log configuration of a bucket.
Notes
If the requested source bucket does not exist, the server will return 404 error with the error code NoSuchBucket. Only the requester who is the owner of the source bucket with FULL_CONTROL permission is allowed to view it. Otherwise, 403 error is returned with the error code AccessDenied.
Request URI
GET /v1/{bucketName}/?logging
| Parameter name | Parameter type | Required or not | Description | Example value | Parameter location |
|---|---|---|---|---|---|
| bucketName | String | Yes | Bucket name | "bucketName_example" | Path |
Parameters of request body
Description of the data structure of request body fields
Response body parameters
Description of the data structure of response body fields
| Parameter name | Parameter type | Description | Example value |
|---|---|---|---|
| status | String | The bucket access logging function status can either be "enabled" or "disabled." Enabled means the function is active, while disabled means it is not. | enabled |
| targetBucket | String | Specifies the bucket designated for storing access logs. This field is omitted in responses when logging is disabled. | dscbucket |
| targetPrefix | String | Specifies the prefix used for naming access log files. This field is omitted in responses when logging is disabled. | mylog- |
Request example
JSON
1GET /v1/bucketName_example/?logging
2 <Common request headers>
3{ }
Response example
JSON
1HTTP/1.1 200 OK
2 <Common response headers>
3{
4 "targetPrefix" : "mylog-",
5 "targetBucket" : "dscbucket",
6 "status" : "enabled"
7}
Error code
Please refer to the general error codes
