Get Lifecycle Rules
Read the lifecycle configuration of a bucket you own.
| Endpoint | Method | Admin Required |
|---|---|---|
/api/v1/buckets/:bucketName/lifecycle | GET | No |
Returns the lifecycle rules of a bucket you own. A bucket with no configuration returns an empty rules array, not an error - the console opens an empty editor either way. This is the same configuration the S3 GET ?lifecycle subresource returns as XML.
Path Parameters
bucketName
string required
The name of the bucket.
Response
{
"rules": [
{
"id": "expire-logs",
"enabled": true,
"prefix": "logs/",
"expirationDays": 30,
"noncurrentVersionExpirationDays": null,
"abortIncompleteMultipartUploadDays": 7
}
]
}
See Set Lifecycle Rules for the rule fields.
Errors
| Status | Reason |
|---|---|
400 | Missing bucket name |
404 | Bucket not found (or not owned by you) |