As of today we’re happy to announce the general availability of the new Folder Lock APIs. Enhancing the control and security over the structure of your folders within Box, these new APIs may be used to lock a folder from being moved or deleted until the lock has been removed.
As part of this launch, there are three new endpoints that are being made available, allowing you to:
- Create a lock on a folder.
- Fetch a list of all locks currently applied to a folder.
- Delete a folder lock.
Creating a new folder lock
When a lock is applied to a folder it will prevent that folder from being moved, transferred to another owner, or deleted, unless these actions are part of standard Box content transfer and delete processes when a user account is deleted.
At the current time a folder lock will apply both lock operations (move and delete) automatically.
Fetching a list of locks on a folder
To determine if a folder lock has been applied to a folder, this endpoint will allow you to supply a folder ID and get back a list of any folder locks that are currently placed on it.
Deleting a lock from a folder
When creating a new folder lock or retrieving a list of locks on a folder, you will receive a folder lock ID as part of the return payload. Using this lock ID you can delete any locks that are currently applied to your folders.