Retention policy
- Last updated on May 15, 2025
- •
- 1 minute to read
To clean up storage, a retention policy was implemented in BackOffice.
Asset retention
Once a day, a background task that finds and deletes outdated assets for all tenants with EnableAssetsRetention set to true is performed on the backend. You can get this value for your tenant with the endpoint GET /api/storage/v1/tenants.
When creating a tenant, the value of the retention policy can be set to:
- Unknown
- Never
- Default
Assets are considered outdated if they meet one of the following conditions:
RetentionPolicyis set toDefault.LastAccessTimeis earlier than theAssetsRetentionPeriodInDaysdefined in the tenant settings.
The default value of AssetsRetentionPeriodInDays is set to 60 days. If AssetsRetentionPeriodInDays is 0, no cleanup is performed for the tenant.
Changing the retention period
To change retention period of an already created tenant, use the endpoint PUT /api/storage/v1/tenants/{id}.
PUT /api/storage/v1/tenants/{id}
{
"settings": {
"enableAssetsRetention": true,
"assetsRetentionPeriodInDays": 1
}
}
Storing private assets
You may want to store a private asset, for example, a private design permanent by changing its retention policy to Never using the endpoint POST /api/storage/v1/private-designs/{id}/retention-policy.
POST /api/storage/v1/private-designs/{id}/retention-policy[?policy&tenantId&ownerId]
{
"policy": "Never"
}
Triggering the cleanup process
To manually trigger the cleanup, use the endpoint POST /api/storage/v1/tenants/{id}/clean-up.
POST /api/storage/v1/tenants/{id}/clean-up
Further Reading
- Learn how to arranging designs in folders.
- Explore how to get a design list using this API.
- Dive into Asset Storage API reference.