Description
Set recycle bin lifecycle.
Note:
The recycle bin lifecycle refers to the retention period for files after they are moved to the recycle bin. Once this period expires, files in the recycle bin will be automatically deleted and cannot be recovered thereafter.
When the recycle bin lifecycle is not set for a Tenant Space, the system will use the retention days of the recycle bin of the media library to which the Tenant Space belongs as the default value.
When the recycle bin lifecycle for a Tenant Space is set, the rules are as follows:
If the newly set retention days are longer than the original retention days, the retention days for files already in the recycle bin will be updated to the newly set value.
If the newly set retention days are shorter than the original retention days, files already in the recycle bin will retain the old retention days, and only files deleted afterwards will use the new retention days.
Request
Request Example
POST /api/v1/recycled/`{LibraryId}`/`{SpaceId}`?lifecycle&access_token=`{AccessToken}`
Request Parameter
|
LibraryId | Media Library ID, obtain it after creating a media library in the media hosting console, see create media library | String | Yes |
SpaceId | Space ID. If the media library is in single-tenant mode, this parameter is fixed as hyphen (`-`). If the media library is in multi-tenant mode, you must specify this parameter. See create tenant space. | String | No |
AccessToken | Access token. For Public Read Media Library or tenant space, this parameter is not specified. Otherwise, you must specify this parameter. See generate access token. | String | No |
Request Body
application/json
Request body example:
|
retentionDays | Recycle bin retention days. Requirement: 0 < retentionDays <= 10000. | Number | Yes |
Response
Response code
Modification succeeded, return HTTP 204 No Content
Response Body
This response has no response body.
Error Codes
Potential error code SetRecycleLifecycleFrequencyLimit 403: Settings are too frequent. You can only set it once within 10 minutes. For common errors, see the Error Code document.