I am currently integrating Box webhooks into my application to track folder lifecycle events. I have noticed an inconsistency in how cascading events are handled between deletion and restoration.
The Scenario: When I trash a folder that contains sub-folders, I receive a FOLDER.TRASHED event for the parent folder and a separate FOLDER.TRASHED event for each of the sub-folders. This cascading behavior is exactly what I expect.
The Issue: When I perform a restore operation on that same parent folder, the sub-folders are successfully restored in the Box UI; however, I only receive a single FOLDER.RESTORED event for the parent folder. No corresponding FOLDER.RESTORED events are triggered for the individual sub-folders that were restored along with it.
My Question:
- Is this behavior by design, or is it a known limitation of the current webhook implementation?
- If this is expected, what is the recommended best practice for identifying which sub-folders were restored when only the parent event is received?
Any guidance or clarification on how to handle this synchronization would be greatly appreciated.