Object Storage
Set lifecycle rules
put
/object-storage/buckets/{bucket_uuid}/lifecycleReplace every lifecycle rule of the bucket: delete objects some days after they are written or on a date, delete old versions, clean up delete markers and abort incomplete multipart uploads. Expired objects are deleted permanently in the background, usually within 48 hours of the due date.
Authorization
Authorization
Authorization*string
Bearer YOUR_API_TOKEN with an API token. The X-API-Key: YOUR_API_TOKEN header works too.
Path parameters
bucket_uuid*string
Request body
Replace every lifecycle rule of the bucket (DELETE removes them all).
application/jsonRequired
rules*array<ObjectStorageLifecycleRule>
Range
items ≤ 1000Properties (8)
id*string
Range
length ≤ 255enabled?boolean
Default
truefilter?ObjectStorageLifecycleFilter | null
Properties (4)
prefix?string | null
Range
length ≤ 4096tags?array<ObjectStorageLifecycleTag> | null
Range
items ≤ 50Properties (2)
key*string
Range
length ≤ 512value*string
Range
length ≤ 512object_size_greater_than?integer | null
object_size_less_than?integer | null
expiration?ObjectStorageLifecycleExpiration | null
Properties (3)
days?integer | null
Days after the object was written
date?string | null
YYYY-MM-DD (midnight UTC), after today
expired_object_delete_marker?boolean | null
Remove delete markers left without any version (versioned buckets)
noncurrent_version_expiration?ObjectStorageLifecycleNoncurrent | null
Properties (2)
noncurrent_days*integer
Days after a version stopped being the current one
newer_noncurrent_versions?integer | null
Keep this many newer versions
abort_incomplete_multipart_upload?ObjectStorageLifecycleAbort | null
Properties (1)
days_after_initiation*integer
transitions?any
Not supported
noncurrent_version_transitions?any
Not supported
Responses
Successful Response
application/json
detail*string
generation?integer | null
notes?array<string>