Skip to main content
Effective Date — May 7, 2026
As part of the IAM hierarchy simplification, a new format of the TIR APIs is now available. All endpoints that previously included /teams/:team_id segment will now follow a service-centric structure, with project_id now passed as a query parameter instead of a path segment. You can read more about this change

Create Lifecycle Rule

Delete objects automatically a set number of days after they are written. A rule applies either to every object in the bucket or only to objects under a prefix.

Lifecycle deletion is irreversible. Objects under a retention period or legal hold are not removed until those locks clear.

POST/datasets/{Dataset_Id}/lifecycle-rule/

Path parameters

  • Dataset_IdPathintegeroptional

    dataset id

Query parameters

  • project_idQueryintegerrequired

    Project ID

  • active_iamQueryintegeroptional

    Active IAM ID (To access contact person account) Find your Active IAM ID here

  • locationQuerystringrequired

    Location

Request body

application/json

object
apply_tostringrequiredall_objects | objects_with_prefix

Scope of the lifecycle rule:

  • all_objects: Apply rule to all objects in the bucket
  • objects_with_prefix: Apply rule only to objects with the specified prefix
expiration_daysstringrequired

Number of days after which objects will be deleted

prefixstring

Object prefix/folder path (required when apply_to is objects_with_prefix)

Responses

200Success response with lifecycle rules information.
object
codeinteger

HTTP status code.

example200
dataarray
errorsobject

Errors encountered during the operation.

messagestring

Result message.

exampleSuccess