Get Lifecycle Rules

Read the lifecycle configuration of a bucket you own.
EndpointMethodAdmin Required
/api/v1/buckets/:bucketName/lifecycleGETNo

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

StatusReason
400Missing bucket name
404Bucket not found (or not owned by you)