[FEATURE] Maintenance Tools APIs
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Problem
System maintenance operations (search-replace, fix assets, drop old versions, clean orphan assets, delete contentlets, delete pushed assets) are currently only accessible via DWR calls to CMSMaintenanceAjax and Struts form actions in ViewCMSMaintenanceAction. Need REST endpoints to answer "How do I clean up and fix the system?"
Goal
Provide REST endpoints for all maintenance tools operations. Long-running operations (fix assets, clean orphan assets) use a start/poll pattern — POST to start, GET to check progress.
APIs
POST /v1/maintenance/_searchAndReplace— DB-wide find/replace across content tablesPOST /v1/maintenance/_fixAssets— Start fix assets inconsistencies taskGET /v1/maintenance/_fixAssets— Poll fix assets progressDELETE /v1/maintenance/_oldVersions— Drop old versions of versionable objects by datePOST /v1/maintenance/_cleanAssets— Start orphan binary asset cleanupGET /v1/maintenance/_cleanAssets— Poll orphan cleanup progressDELETE /v1/maintenance/_contentlets— Bulk delete contentlets by identifier listDELETE /v1/maintenance/_pushedAssets— Delete all push publishing history
Personas
- Developer Teams — Need REST APIs for Angular Tools tab
- System Administrators — Need to perform system maintenance, cleanup old data, fix inconsistencies
Legacy Reference
- DWR Class:
CMSMaintenanceAjax.java— fixAssetsInconsistencies, removeOldVersions, cleanAssets, deleteContentletsFromIdList, deletePushedAssets - Struts Action:
ViewCMSMaintenanceAction.java— searchAndReplace (cmd=searchandreplace) - Backend Services:
MaintenanceUtil.DBSearchAndReplace(),CMSMaintenanceFactory.deleteOldAssetVersions(),CleanAssetsThread,FixTasksExecutor - JSP:
view_cms_maintenance.jsplines 1541–1851 (Tools tab) - Target Class:
MaintenanceResource.java(/api/v1/maintenance)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with MaintenanceResource.java under /api/v1/maintenance, then compare the legacy CMSMaintenanceAjax.java, ViewCMSMaintenanceAction.java, and the listed backend services. Trace how each maintenance operation currently works and how the JSP invokes it. Done means all eight documented REST endpoints exist, with start/poll behavior for the two long-running tasks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100