Box API - Create Folder and enable "Auto-Delete on selected date"
AnsweredI'm looking at the API for "Create Folder" and I don't see any mention of the "Auto-Delete" inside the JSON payload. I see where to configure 'Sharing' and 'Email upload'... Is this actually an option? Can I configure a folder and then set it to auto delete 90 days after creation all via the API?
-
Hey ,
You can achieve that by either calling the delete folder endpoint or by using the Box Retention Policy endpoint to determine a duration that a folder cannot be deleted. At the end of this period(90 days in this case) you can choose to: permanently delete or remove the retention policy from the folder.
Let me know if this is helpful or if you have any other questions, thank you!
-
The idea is to not have to need to make an additional API call (90 days later) to delete the folder. There is a setting in box at both the folder and file level that allows you to set it to delete (move to trash) on a specified date. I'm trying to figure out if I can configure that setting via the API (Create Folder or Update Folder) or some other API call to manage the settings on the folder.
-
As mentioned, Box offers Governance features like Retention Policies, which can be used to ensure a file is not deleted for some amount of time and then delete it at the end of that period. However, aside from that, there is not a simple feature in the API or SDK to perform this functionality automatically.
-
Yes, Governance is generally sold as an add-on feature to enterprise accounts. The Retention Policies feature I mentioned is available in our API and is supported in our SDKs.
Please sign in to leave a comment.
Comments
7 comments