Add cleanup policies Rest APIs
Problem
As part of implementing virtual registry cache entry lifecycle management (see #548566 (closed)), we need to create REST API endpoints to allow users to programmatically manage cleanup policies.
Solution
Implement REST API endpoints for virtual registry cleanup policies that will allow users to:
- Create a new cleanup policy for a top-level group
- Retrieve existing cleanup policy details
- Update an existing cleanup policy
- Delete a cleanup policy
The API should support the following parameters:
keep_n_days_after_download: Number of days after which unused cache entries can be removedcadence: How often the cleanup job should run (daily, weekly, monthly, etc.)enabled: Boolean to enable/disable the policy
Implementation Details
- Create new API endpoints under the virtual registry namespace
- Ensure proper authentication and authorization (group owners only)
- Add appropriate documentation
- Include tests for all endpoints
Edited by Moaz Khalifa