Contact us

Applies to: Customer's Canvas Hub cloud; Asset Storage cloud

Skip to main content

Retention policy

BackOffice implements a retention policy to clean up storage. It removes temporary assets and project data that have not been accessed within the tenant retention period. Use this page to change the retention period, mark individual assets as permanent, or trigger cleanup manually.

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 both of the following conditions are met:

  • RetentionPolicy is set to Default.
  • LastAccessTime is earlier than the AssetsRetentionPeriodInDays defined 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
}
}
// => 200 Success

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"
}
// => 200 Success

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
// => 200 Success

Related tasks

Was this page helpful?