Object Storage

Set lifecycle rules

put/object-storage/buckets/{bucket_uuid}/lifecycle

Replace 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>
Rangeitems ≤ 1000
Properties (8)
id*string
Rangelength ≤ 255
enabled?boolean
Defaulttrue
filter?ObjectStorageLifecycleFilter | null
Properties (4)
prefix?string | null
Rangelength ≤ 4096
tags?array<ObjectStorageLifecycleTag> | null
Rangeitems ≤ 50
Properties (2)
key*string
Rangelength ≤ 512
value*string
Rangelength ≤ 512
object_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>