SandboxesTemplatesTemplate lifecycle

Update project template lifecycle settings

Replace the archive and delete rules for a project's templates. A null field is not set at this scope and inherits. The body replaces the whole scope: a field you omit is cleared, not kept. Requires the project admin role.

PUT
/v1/orgs/{org}/projects/{project}/settings/template-lifecycle
AuthorizationBearer <token>

API key starting with tektona_. Create one at app-dev.tektona.ai under API Keys.

In: header

Path Parameters

org*string

Organization name

project*string

Project name

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

archive_after_days_unused*|

Days a version goes unused before the archive rule takes it. Null = inherit.

Formatint32
Range1 <= value <= 14
delete_after_days_archived*|

Days a version stays archived before the delete rule takes it. 0 = the next sweep. Null = inherit.

Formatint32
Range0 <= value <= 7

Response Body

application/json

application/problem+json

curl -X PUT "https://example.com/v1/orgs/string/projects/string/settings/template-lifecycle" \  -H "Content-Type: application/json" \  -d '{    "archive_after_days_unused": 1,    "delete_after_days_archived": 0  }'
{  "effective": {    "archive_after_days_unused": 0,    "delete_after_days_archived": 0  },  "settings": {    "archive_after_days_unused": 1,    "delete_after_days_archived": 0  },  "source": {    "archive_after_days_unused": "project",    "delete_after_days_archived": "project"  }}