Get a lineage's retention window
How long unprotected versions of this lineage are kept before the nightly sweep purges their weights. With no window set (the default) versions are kept until you delete them. Protected versions (targeted by an alias, the previous production version, pinned or tagged, or in use by a deployment) are never purged.
curl --request GET \
--url https://api.veri.studio/v1/models/{name}/retention \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.veri.studio/v1/models/{name}/retention"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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
Response
The lineage window and the effective one
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 GET \
--url https://api.veri.studio/v1/models/{name}/retention \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.veri.studio/v1/models/{name}/retention"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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
}
