Cleanup Sandbox internals
The wizard asks the sandbox-cleanup action for the objects of one app and category at a time (operation getSandboxObjects). The action calls the Adobe Experience Platform APIs for that sandbox, 100 items per page, with a safety limit of 10,000 items, and returns every object in one standard shape: id, type, name, createdBy, lastModifiedBy, and lastModifiedDate.
The Keep and Remove suggestions are computed in the frontend from the chosen method. When the user confirms, the wizard calls the executeCleanup operation. The action then runs the cleanup on the server (runCleanup.js), removing categories in a fixed order that respects dependencies, and records every removed object and every error in the sandboxCleanup record. The frontend polls the record about every 4 seconds to show progress.
The action authenticates to Adobe APIs with an OAuth Server-to-Server token, requested from IMS with the service credentials (SERVICE_API_KEY, SERVICE_CLIENT_SECRET).
When audit logging is enabled in the app settings (the default), the action writes audit log entries through the db-write action. The default retention is 90 days.
Some removals need extra steps first. For example, journeys and campaigns are stopped before they are deleted, and a destination flow is unmapped before an audience is removed.
TODO(user): confirm whether to document these per-category steps.