Setting expiration date on a folder
What is the JAVA API to set up an auto-delete date on folder?
-
It's currently not possible to set an auto-delete date directly on the folder object through the API, but there are three workarounds that I'll explain below.
Option 1
If you have Box Governance set up in your Box instance, you can create a retention policy that defines an auto-delete date. Then you can apply that retention policy to a folder. This feature is available through our API, but we haven't implemented it in our Java SDK yet.
Option 2
This option won't delete a folder, but will allow you turn off access to it. You can share a folder by creating a shared link for the folder. Then you can set a date to disable the shared link. Here is the method that implements this in our Java SDK.
Option 3
Like Option 2, this option won't delete a folder, but will allow you turn off access to it. You can create a collaboration on a folder, and then set an expiration date for that collaboration. Here are the relevant methods from our Java SDK.
Please sign in to leave a comment.
Comments
1 comment