Skip to main content

Lifecycle

GET Lifecycles#

Get all bucket lifecycle configuration.

GET
MethodGET
URL or EndPoint/api/v{version}/projects/{projectId}/buckets/{name}/lifecycle
HeadersAuthorization
Parametersversion, projectId, name
BodyNot Applicable

The description of the URL parameters is as follows:

URL Parameter NameMandatoryTypeExampleDescription
v{version}Yesstringv1Shows the version of API
{projectId}YesGuidf5faa2e3-316b-4dd0-8f4d-ab41f6f71bd6Shows the id of project
{name}YesstringstringShows the name of bucket

The description of the parameters is as follows:

Parameter NameMandatoryTypeExampleDescription
VersionYesstring($uuid)v1Shows the version of API
Project IdYesstring($Guid)f5faa2e3-316b-4dd0-8f4d-ab41f6f71bd6Shows the project id of API
NameYesstringrandomstringShows the bucket name

Request body#

The request does not have a request body.

Responses#

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in json format by the service.

{  "success": true,  "errors": [    "string"  ],  "messages": [    "string"  ],  "result": [    {      "id": "string",      "status": "string",      "expiration": {        "dateUtc": "2022-03-31T14:27:14.768Z",        "days": 0,        "expiredObjectDeleteMarker": true      }    }  ],  "resultInfo": {    "totalCount": 0,    "pageIndex": 0,    "pageSize": 0,    "totalPages": 0,    "hasNextPage": true,    "hasPreviousPage": true  }}
Field NameTypeExampleDescription
successbooltrueIf response is success will return true otherwise will return false
errorsarray []"string"Indicate if there was an error
messagesarray []"string"Returns the response message from back-end
resultarray [object]Return a list of created buckets
idstring"string"Returns the name of a bucket
statuslong1234Returns the status of bucket lifecycle Disabled or Enabled
expirationarray [object]Returns an expiration object of bucket lifecycle
dateUtcDateTime"2022-03-31T14:27:14.768ZReturns the date time of expiration of bucket lifecycle
daysint0Returns the number of days.
expiredObjectDeleteMarkerbooltrueReturns the delete marker of expired object
resultInfoarray [object]Returns an object of behavior
totalCountinteger($int32)0How many records of behavior entity are in database
pageIndexinteger($int32)0Returns how many pages of paganed data are
pageSizeinteger($int32)0Returns paganed data
totalPagesinteger($int32)0How many pages
hasNextPagebooltrueReturns the next page of paganed data
hasPreviousPagebooltrueReturns the previous page of paganed data

Errors#

For information about the errors that are common to all actions, see Common Errors:

HTTP Status Code: 401 Unauthorized

HTTP Status Code: 403 Forbidden

HTTP Status Code: 404 If the service is down

POST Lifecycle#

Create a bucket lifecycle.

POST
MethodPOST
URL or EndPoint/api/v{version}/projects/{projectId}/buckets/{name}/lifecycle
HeadersAuthorization
ParametersprojectId, version
Body{id, lifecyclePrefixPredicate, lifecycleTagPredicate, expiration, status, abortIncompleteMultipartUpload, noncurrentVersionExpiration, noncurrentVersionTransitions, transitions}

The description of the URL parameters is as follows:

URL Parameter NameMandatoryTypeExampleDescription
v{version}Yesstringv1Shows the version of API
{projectId}Yesstring2e21fae6-af4c-4a4a-e0fc-08d903f55711Shows the project Id
{name}YesstringstringShows the bucket name

The description of the parameters is as follows:

Parameter NameMandatoryTypeExampleDescription
versionYesstring($uuid)v1Shows the version of API
projectIdYesstring2e21fae6-af4c-4a4a-e0fc-08d903f55711Id of the project
{name}YesstringstringShows the bucket name

Request body#

{  "id": "string",  "lifecyclePrefixPredicate": {    "prefix": "string"  },  "lifecycleTagPredicate": {    "tag": {      "key": "string",      "value": "string"    }  },  "expiration": {    "dateUtc": "2022-03-31T14:36:48.792Z",    "days": 0,    "expiredObjectDeleteMarker": true  },  "status": "string",  "abortIncompleteMultipartUpload": {    "daysAfterInitiation": 0  },  "noncurrentVersionExpiration": {    "newerNoncurrentVersions": 0,    "noncurrentDays": 0  },  "noncurrentVersionTransitions": [    {      "newerNoncurrentVersions": 0,      "noncurrentDays": 0,      "storageClass": {}    }  ],  "transitions": [    {      "dateUtc": "2022-03-31T14:36:48.792Z",      "days": 0,      "storageClass": {}    }  ]}

The description of the parameters is as follows:

Body Parameter NameMandatoryTypeExampleDescription
idYesstring"string"Sends the bucketName
lifecyclePrefixPredicateYesarray[object]Sends the object of lifecycle prefix predicate
prefixYesbooltrueSends the prefix
lifecycleTagPredicateYesarray[object]Sends object of lifecycle tag predicate
tagYesarray[object]Sends object lock of the tag
keyYesstring"string"Sends the unique key of the tag
valueYesstring"string"Sends the value of the tag
expirationYesarray[object]Sends object of lifecycle expiration
dateUtcYesDateTime"2022-03-31T14:36:48.792Z"Sends the date time of lifecycle
daysYesint31Sends days of lifecycle expiration
expiredObjectDeleteMarkerYesbooltrueSends the delete marker of expired object
statusYes"string"stringSends status of lifecycle Disabled or Enabled
abortIncompleteMultipartUploadYesarray[object]Sends the object of abort incomplete multipart upload
daysAfterInitiationYesint0Sends number of days after initiation
noncurrentVersionExpirationYesarray[object]Sends object of noncurrent version expiration
newerNoncurrentVersionsYesint0Sends the newer noncurrent versions
noncurrentDaysYesint0Sends the noncurrent days
noncurrentVersionTransitionsYesarray[object]Sends the object of noncurrent version transitions
newerNoncurrentVersionsYesint0Sends the newer noncurrent versions
noncurrentDaysYesint0Sends the noncurrent days
storageClassNoarray[object]Sends the object of storage classes
transitionsYesarray[object]Sends the object of transitions
dateUtcYesDateTime"2022-03-31T14:36:48.792Z"Sends the date time of lifecycle
daysYesint31Sends days of lifecycle expiration
storageClassNoarray[object]Sends the object of storage classes

Responses#

If the action is successful, the service sends back an HTTP 201 response.

The following data is returned in json format by the service.

{  "success": true,  "errors": [    "string"  ],  "messages": [    "string"  ],  "result": {    "id": "string",    "abortIncompleteMultipartUpload": {      "daysAfterInitiation": 0    },    "expiration": {      "dateUtc": "2022-03-31T15:02:28.989Z",      "days": 0,      "expiredObjectDeleteMarker": true    },    "noncurrentVersionExpiration": {      "newerNoncurrentVersions": 0,      "noncurrentDays": 0    },    "filter": {      "lifecycleFilterPredicate": {}    },    "prefixFilter": {      "prefix": "string"    },    "tagFilter": {      "tag": {        "key": "string",        "value": "string"      }    },    "status": {      "value": "string"    },    "noncurrentVersionTransitions": [      {        "newerNoncurrentVersions": 0,        "noncurrentDays": 0,        "storageClass": {          "value": "string"        }      }    ],    "transitions": [      {        "dateUtc": "2022-03-31T15:02:28.990Z",        "days": 0,        "storageClass": {          "value": "string"        }      }    ]  },  "resultInfo": {    "totalCount": 0,    "pageIndex": 0,    "pageSize": 0,}
Field NameTypeExampleDescription
successbooltrueIf response is success will return true otherwise will return false
errorsarray []"string"Indicate if there was an error
messagesarray []"string"Returns the response message from back-end
resultarray [object]Returns the result of created bucket
idstring"string"Sends the bucketName
abortIncompleteMultipartUploadarray[object]Returns the object of abort incomplete multipart upload
daysAfterInitiationint0Returns number of days after initiation
expirationarray[object]Returns object of lifecycle expiration
dateUtcDateTime"2022-03-31T14:36:48.792Z"Returns the date time of lifecycle
daysint31Returns days of lifecycle expiration
expiredObjectDeleteMarkerbooltrueReturns the delete marker of expired object
noncurrentVersionExpirationarray[object]Returns object of noncurrent version expiration
newerNoncurrentVersionsint0Returns the newer noncurrent versions
noncurrentDaysint0Returns the noncurrent days
filterarray[object]Returns the object of lifecycle filer
lifecycleFilterPredicatearray[object]Returns the lifecycle filter predicate
prefixFilterarray[object]Returns the object of prefix filter
prefix"string"stringReturns the prefix
tagFilterarray[object]Returns the object of lifecycle tag filter
tagarray[object]Returns object of the tag
keystring"string"Returns the unique key of the tag
valuestring"string"Returns the value of the tag
status"string"stringReturns status of lifecycle Disabled or Enabled
noncurrentVersionTransitionsarray[object]Returns the object of noncurrent version transitions
newerNoncurrentVersionsint0Returns the newer noncurrent versions
noncurrentDaysint0Returns the noncurrent days
storageClassarray[object]Returns the object of storage classes
transitionsarray[object]Returns the object of transitions
dateUtcDateTime"2022-03-31T14:36:48.792Z"Returns the date time of lifecycle
daysint31Returns days of lifecycle expiration
storageClassarray[object]Returns the object of storage classes

Errors

For information about the errors that are common to all actions, see Common Errors:

  • HTTP Status Code: 400 Bad Request
  • HTTP Status Code: 401 Unauthorized
  • HTTP Status Code: 403 Forbidden
  • HTTP Status Code: 404 Not found

GET Lifecycle#

Get bucket lifecycle configuration.

GET
MethodGET
URL or EndPoint/api/v{version}/projects/{projectId}/buckets/{name}/lifecycle/{id}
HeadersAuthorization
Parametersversion, projectId,name
BodyNot Applicable

The description of the URL parameters is as follows:

URL Parameter NameMandatoryTypeExampleDescription
v{version}Yesstringv1Shows the version of API
{projectId}YesGuidf5faa2e3-316b-4dd0-8f4d-ab41f6f71bd6Shows the id of project
{name}Yesstring"string"Shows the name of the bucket
{id}Yesstring"string"Shows the lifecycle id

The description of the parameters is as follows:

Parameter NameMandatoryTypeExampleDescription
VersionYesstring($uuid)v1Shows the version of API
Project IdYesstring($Guid)f5faa2e3-316b-4dd0-8f4d-ab41f6f71bd6Shows the project id of API
NameYesstring"string"Shows the name of the bucket
IdYesstring"string"Shows the lifecycle id

Request body#

The request does not have a request body.

Responses#

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in json format by the service.

{  "success": true,  "errors": [    "string"  ],  "messages": [    "string"  ],  "result": {    "id": "string",    "abortIncompleteMultipartUpload": {      "daysAfterInitiation": 0    },    "expiration": {      "dateUtc": "2022-04-01T07:16:54.007Z",      "days": 0,      "expiredObjectDeleteMarker": true    },    "noncurrentVersionExpiration": {      "newerNoncurrentVersions": 0,      "noncurrentDays": 0    },    "filter": {      "lifecycleFilterPredicate": {}    },    "prefixFilter": {      "prefix": "string"    },    "tagFilter": {      "tag": {        "key": "string",        "value": "string"      }    },    "status": {      "value": "string"    },    "noncurrentVersionTransitions": [      {        "newerNoncurrentVersions": 0,        "noncurrentDays": 0,        "storageClass": {          "value": "string"        }      }    ],    "transitions": [      {        "dateUtc": "2022-04-01T07:16:54.007Z",        "days": 0,        "storageClass": {          "value": "string"        }      }    ]  },  "resultInfo": {    "totalCount": 0,    "pageIndex": 0,    "pageSize": 0,    "totalPages": 0,    "hasNextPage": true,    "hasPreviousPage": true  }}
Field NameTypeExampleDescription
successbooltrueIf response is success will return true otherwise will return false
errorsarray []"string"Indicate if there was an error
messagesarray []"string"Returns the response message from back-end
resultarray [object]Returns the result of created bucket
idstring"string"Sends the bucketName
abortIncompleteMultipartUploadarray[object]Returns the object of abort incomplete multipart upload
daysAfterInitiationint0Returns number of days after initiation
expirationarray[object]Returns object of lifecycle expiration
dateUtcDateTime"2022-03-31T14:36:48.792Z"Returns the date time of lifecycle
daysint31Returns days of lifecycle expiration
expiredObjectDeleteMarkerbooltrueReturns the delete marker of expired object
noncurrentVersionExpirationarray[object]Returns object of noncurrent version expiration
newerNoncurrentVersionsint0Returns the newer noncurrent versions
noncurrentDaysint0Returns the noncurrent days
filterarray[object]Returns the object of lifecycle filer
lifecycleFilterPredicatearray[object]Returns the lifecycle filter predicate
prefixFilterarray[object]Returns the object of prefix filter
prefix"string"stringReturns the prefix
tagFilterarray[object]Returns the object of lifecycle tag filter
tagarray[object]Returns object of the tag
keystring"string"Returns the unique key of the tag
valuestring"string"Returns the value of the tag
status"string"stringReturns status of lifecycle Disabled or Enabled
noncurrentVersionTransitionsarray[object]Returns the object of noncurrent version transitions
newerNoncurrentVersionsint0Returns the newer noncurrent versions
noncurrentDaysint0Returns the noncurrent days
storageClassarray[object]Returns the object of storage classes
transitionsarray[object]Returns the object of transitions
dateUtcDateTime"2022-03-31T14:36:48.792Z"Returns the date time of lifecycle
daysint31Returns days of lifecycle expiration
storageClassarray[object]Returns the object of storage classes

Errors

For information about the errors that are common to all actions, see Common Errors:

  • HTTP Status Code: 401 Unauthorized
  • HTTP Status Code: 403 Forbidden
  • HTTP Status Code: 404 Not found

PUT Lifecycle#

Update bucket lifecycle configuration

PUT
MethodPUT
URL or EndPoint/api/v{version}/projects/{projectId}/buckets/{name}/lifecycle/{id}
HeadersAuthorization
ParametersprojectId, version, name, id
Body{id, lifecyclePrefixPredicate, lifecycleTagPredicate, expiration, status, abortIncompleteMultipartUpload, noncurrentVersionExpiration, noncurrentVersionTransitions, transitions}

The description of the URL parameters is as follows:

URL Parameter NameMandatoryTypeExampleDescription
v{version}Yesstringv1Shows the version of API
{projectId}Yesstring2e21fae6-af4c-4a4a-e0fc-08d903f55711Shows the project Id
nameYesstring"string"Shows the bucket name
idYesstring"string"Shows the id of lifecycle

The description of the parameters is as follows:

Parameter NameMandatoryTypeExampleDescription
versionYesstring($uuid)v1Shows the version of API
projectIdYesstring2e21fae6-af4c-4a4a-e0fc-08d903f55711Put the id of project
nameYesstring"string"Put the bucket name
idYesstring"string"Shows the id of lifecycle

Request body#

{  "id": "string",  "lifecyclePrefixPredicate": {    "prefix": "string"  },  "lifecycleTagPredicate": {    "tag": {      "key": "string",      "value": "string"    }  },  "expiration": {    "dateUtc": "2022-03-31T14:36:48.792Z",    "days": 0,    "expiredObjectDeleteMarker": true  },  "status": "string",  "abortIncompleteMultipartUpload": {    "daysAfterInitiation": 0  },  "noncurrentVersionExpiration": {    "newerNoncurrentVersions": 0,    "noncurrentDays": 0  },  "noncurrentVersionTransitions": [    {      "newerNoncurrentVersions": 0,      "noncurrentDays": 0,      "storageClass": {}    }  ],  "transitions": [    {      "dateUtc": "2022-03-31T14:36:48.792Z",      "days": 0,      "storageClass": {}    }  ]}

The description of the parameters is as follows:

Body Parameter NameMandatoryTypeExampleDescription
idYesstring"string"Sends the bucketName
lifecyclePrefixPredicateYesarray[object]Sends the object of lifecycle prefix predicate
prefixYesbooltrueSends the prefix
lifecycleTagPredicateYesarray[object]Sends object of lifecycle tag predicate
tagYesarray[object]Sends object lock of the tag
keyYesstring"string"Sends the unique key of the tag
valueYesstring"string"Sends the value of the tag
expirationYesarray[object]Sends object of lifecycle expiration
dateUtcYesDateTime"2022-03-31T14:36:48.792Z"Sends the date time of lifecycle
daysYesint31Sends days of lifecycle expiration
expiredObjectDeleteMarkerYesbooltrueSends the delete marker of expired object
statusYes"string"stringSends status of lifecycle Disabled or Enabled
abortIncompleteMultipartUploadYesarray[object]Sends the object of abort incomplete multipart upload
daysAfterInitiationYesint0Sends number of days after initiation
noncurrentVersionExpirationYesarray[object]Sends object of noncurrent version expiration
newerNoncurrentVersionsYesint0Sends the newer noncurrent versions
noncurrentDaysYesint0Sends the noncurrent days
noncurrentVersionTransitionsYesarray[object]Sends the object of noncurrent version transitions
newerNoncurrentVersionsYesint0Sends the newer noncurrent versions
noncurrentDaysYesint0Sends the noncurrent days
storageClassNoarray[object]Sends the object of storage classes
transitionsYesarray[object]Sends the object of transitions
dateUtcYesDateTime"2022-03-31T14:36:48.792Z"Sends the date time of lifecycle
daysYesint31Sends days of lifecycle expiration
storageClassNoarray[object]Sends the object of storage classes

Responses#

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in json format by the service.

{  "success": true,  "errors": [    "string"  ],  "messages": [    "string"  ],  "result": {    "abortIncompleteMultipartUpload": {      "daysAfterInitiation": 0    },    "expiration": {      "dateUtc": "2022-03-31T15:45:49.470Z",      "days": 0,      "expiredObjectDeleteMarker": true    },    "id": "string",    "noncurrentVersionExpiration": {      "newerNoncurrentVersions": 0,      "noncurrentDays": 0    },    "lifecyclePrefixPredicate": {      "prefix": "string"    },    "lifecycleTagPredicate": {      "tag": {        "key": "string",        "value": "string"      }    },    "status": {      "value": "string"    },    "noncurrentVersionTransitions": [      {        "newerNoncurrentVersions": 0,        "noncurrentDays": 0,        "storageClass": {          "value": "string"        }      }    ],    "transitions": [      {        "dateUtc": "2022-03-31T15:45:49.470Z",        "days": 0,        "storageClass": {          "value": "string"        }      }    ]  },  "resultInfo": {    "totalCount": 0,    "pageIndex": 0,    "pageSize": 0,    "totalPages": 0,    "hasNextPage": true,    "hasPreviousPage": true  }}
Field NameTypeExampleDescription
successbooltrueIf response is success will return true otherwise will return false
errorsarray []"string"Indicate if there was an error
messagesarray []"string"Returns the response message from back-end
resultarray [object]Returns the result of created bucket
idstring"string"Sends the bucketName
abortIncompleteMultipartUploadarray[object]Returns the object of abort incomplete multipart upload
daysAfterInitiationint0Returns number of days after initiation
expirationarray[object]Returns object of lifecycle expiration
dateUtcDateTime"2022-03-31T14:36:48.792Z"Returns the date time of lifecycle
daysint31Returns days of lifecycle expiration
expiredObjectDeleteMarkerbooltrueReturns the delete marker of expired object
noncurrentVersionExpirationarray[object]Returns object of noncurrent version expiration
newerNoncurrentVersionsint0Returns the newer noncurrent versions
noncurrentDaysint0Returns the noncurrent days
lifecycleFilterPredicatearray[object]Returns the lifecycle filter predicate
prefix"string"stringReturns the prefix
lifecycleTagPredicatearray[object]Returns the object of lifecycle tag filter
tagarray[object]Returns object of the tag
keystring"string"Returns the unique key of the tag
valuestring"string"Returns the value of the tag
status"string"stringReturns status of lifecycle Disabled or Enabled
noncurrentVersionTransitionsarray[object]Returns the object of noncurrent version transitions
newerNoncurrentVersionsint0Returns the newer noncurrent versions
noncurrentDaysint0Returns the noncurrent days
storageClassarray[object]Returns the object of storage classes
transitionsarray[object]Returns the object of transitions
dateUtcDateTime"2022-03-31T14:36:48.792Z"Returns the date time of lifecycle
daysint31Returns days of lifecycle expiration
storageClassarray[object]Returns the object of storage classes

Errors

For information about the errors that are common to all actions, see Common Errors:

  • HTTP Status Code: 400 Bad Request
  • HTTP Status Code: 401 Unauthorized
  • HTTP Status Code: 403 Forbidden
  • HTTP Status Code: 404 Not found

DELETE Lifecycle#

Delete bucket lifecycle configuration

DELETE
MethodDELETE
URL or EndPoint/api/v{version}/projects/{projectId}/buckets/{name}/lifecycle/{id}
HeadersAuthorization
Parametersname, projectId, version, id
BodyNot Applicable

The description of the URL parameters is as follows:

URL Parameter NameMandatoryTypeExampleDescription
v{version}Yesstringv1Shows the version of API
{projectId}Yesstring2e21fae6-af4c-4a4a-e0fc-08d903f55711Shows the project Id
nameYesstring"string"Shows the bucket name
idYesstring"string"Shows the id of lifecycle

The description of the parameters is as follows:

Parameter NameMandatoryTypeExampleDescription
v{version}Yesstringv1Shows the version of API
{projectId}Yesstring2e21fae6-af4c-4a4a-e0fc-08d903f55711Shows the project Id
nameYesstring"string"Shows the bucket name
idYesstring"string"Shows the id of lifecycle

Request Body#

The request does not have a request body.

Responses#

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in json format by the service.

{  "success": true,  "errors": [    "string"  ],  "messages": [    "string"  ],  "result": true,  "resultInfo": {    "totalCount": 0,    "pageIndex": 0,    "pageSize": 0,    "totalPages": 0,    "hasNextPage": true,    "hasPreviousPage": true  }}
Field NameTypeExampleDescription
successbooltrueIf response is success will return true otherwise will return false
errorsarray []"string"Indicate if there was an error
messagesarray []"string"Returns the response message from back-end
resultstring"string"Return the result of updated bucket

Errors

For information about the errors that are common to all actions, see Common Errors:

  • HTTP Status Code: 401 Unauthorized
  • HTTP Status Code: 403 Forbidden
  • HTTP Status Code: 404 Not found