Set a lineage's retention window
Override the workspace default for this lineage. retention_days 0 opts the lineage into zero-data-retention (eligible versions purged by the next nightly sweep); null clears the override.
curl --request PATCH \
--url https://api.veri.studio/v1/models/{name}/retention \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"retention_days": 123
}
'import requests
url = "https://api.veri.studio/v1/models/{name}/retention"
payload = { "retention_days": 123 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({retention_days: 123})
};
fetch('https://api.veri.studio/v1/models/{name}/retention', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "<string>",
"model": "<string>",
"retention_days": 123,
"workspace_default_days": 123,
"effective_days": 123
}Authorizations
API key with the vk_ prefix. Create one from the dashboard.
Path Parameters
Lineage name
Body
Days to keep unprotected versions (0..=3650; 0 = zero-data-retention). null or omitted clears the override so the workspace default applies.
Response
The updated window
A lineage's retention window.
Always "model_retention".
Lineage name.
The lineage override in days; null = the workspace default applies.
The workspace default (workspace_settings.model_retention_days); null = the workspace set none.
What the sweeper actually applies to this lineage: the override if set, else the workspace default. null = no window: versions are kept until you delete them. 0 = eligible versions are purged by the next nightly sweep.
curl --request PATCH \
--url https://api.veri.studio/v1/models/{name}/retention \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"retention_days": 123
}
'import requests
url = "https://api.veri.studio/v1/models/{name}/retention"
payload = { "retention_days": 123 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({retention_days: 123})
};
fetch('https://api.veri.studio/v1/models/{name}/retention', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "<string>",
"model": "<string>",
"retention_days": 123,
"workspace_default_days": 123,
"effective_days": 123
}
