curl --request POST \ --url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/datasets/{Dataset_Id}/lifecycle-rule/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '{ "apply_to": "all_objects", "expiration_days": "string", "prefix": "string"}'import requests
response = requests.post( "https://api.e2enetworks.com/myaccount/api/v1/gpu/datasets/{Dataset_Id}/lifecycle-rule/", params={"project_id": "<PROJECT_ID>", "location": "<LOCATION>", "apikey": "<API_KEY>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "apply_to": "all_objects", "expiration_days": "string", "prefix": "string", },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/gpu/datasets/{Dataset_Id}/lifecycle-rule/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", location: "<LOCATION>", apikey: "<API_KEY>" });
const response = await fetch(url, { method: "POST", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify({ "apply_to": "all_objects", "expiration_days": "string", "prefix": "string" }),});console.log(await response.json());Create a lifecycle rule for automatic object expiration in the dataset’s EOS bucket. Rules can be applied to all objects or to objects with a specific prefix.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Project ID
Active IAM ID (To access contact person account) Find your Active IAM ID here
Location
Request Bodyrequired
Section titled “Request Bodyrequired”object
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
Number of days after which objects will be deleted
Object prefix/folder path (required when apply_to is objects_with_prefix)
Responses
Section titled “Responses”Success response with lifecycle rules information.
object
HTTP status code.
object
Unique identifier of the lifecycle rule.
Indicates whether the rule is deleted.
Rule creation timestamp.
Rule last updated timestamp.
Unique lifecycle rule identifier.
Whether the lifecycle rule is enabled.
Object prefix the rule applies to.
Expiry date or number of days.
Expiry for non-current object versions.
Transition rule definition.
Storage class for transition.
Tags associated with the rule.
Bucket location.
Associated bucket ID.
User ID who created the rule.
Errors encountered during the operation.
object
Result message.
Example
{ "code": 200, "data": [ { "id": 1711, "deleted": false, "created_at": "2026-02-05T10:43:25.612412Z", "updated_at": "2026-02-05T10:43:25.612430Z", "rule_id": "b0c6b464474f45eebcd626058ac637e7", "enabled": true, "prefix": "", "expiry_date_or_days": "1", "noncurrent_version_expiration_date_or_days": "", "transition": "", "storage_class": "", "tags": "", "location": "Delhi", "bucket": 16731, "user": 32970 } ], "errors": {}, "message": "Success"}