dotCMS / dotCMS/core

[EPIC]: Maintenance Portlet REST APIs

Open
#35,189 0 comments 0 reactions 1 assignee View on GitHub

@hassandotcms is already working on this.

Since Apr 3, 2026.

Team : Modernization
Dominant language
Java
Stars
970
Forks
486
Avg merge
3d 33m
Merged PRs (30d)
170

Description

Vision

Build REST APIs for Maintenance portlet management to support migrating JSP UI to Angular. Angular needs headless access to cache management, maintenance tools, thread diagnostics, session management, system jobs, and log file operations.

Problem/Solution

Problem

Maintenance portlet UI is in JSP with DWR AJAX calls (CMSMaintenanceAjax, ThreadMonitorTool, UserSessionAjax) and Struts form actions (ViewCMSMaintenanceAction). We're migrating to Angular. Angular needs modern REST APIs, not legacy DWR/Struts endpoints.

Solution

Build 19 REST endpoints across 6 API families:

Cache Management APIs — "What's in cache and how do I flush it?"

  • GET /v1/caches — List cache region names for selection
  • GET /v1/caches/stats — Cache statistics with JVM memory and per-region hit/miss rates
  • DELETE /v1/caches/{regionName} — Flush specific region or all caches

Maintenance Tools APIs — "How do I clean up and fix the system?"

  • POST /v1/maintenance/_searchAndReplace — DB-wide find/replace across content tables
  • POST /v1/maintenance/_fixAssets — Start fix assets inconsistencies task
  • GET /v1/maintenance/_fixAssets — Poll fix assets progress
  • DELETE /v1/maintenance/_oldVersions — Drop old versions of versionable objects by date
  • POST /v1/maintenance/_cleanAssets — Start orphan binary asset cleanup
  • GET /v1/maintenance/_cleanAssets — Poll orphan cleanup progress
  • DELETE /v1/maintenance/_contentlets — Bulk delete contentlets by identifier list
  • DELETE /v1/maintenance/_pushedAssets — Delete all push publishing history

Thread Diagnostics APIs — "What's happening inside the JVM?"

  • GET /v1/maintenance/_threads — Full thread dump as structured JSON
  • GET /v1/maintenance/_threads/info — System startup time and thread counts

Session Management APIs — "Who's logged in and how do I manage sessions?"

  • GET /v1/maintenance/_sessions — List active user sessions
  • DELETE /v1/maintenance/_sessions/{token} — Kill specific session
  • DELETE /v1/maintenance/_sessions — Kill all sessions except caller

Quartz System Jobs APIs — "What system jobs are scheduled?"

  • GET /v1/maintenance/_systemJobs — List all Quartz scheduler jobs
  • DELETE /v1/maintenance/_systemJobs/{group}/{name} — Delete a Quartz job

Log File Listing API — "What logs can I view?"

  • GET /v1/maintenance/_logFiles — List available log files for tailing/download

Additionally, 1 existing endpoint requires modification:

  • DELETE /v1/caches/provider/{p}/flush — Add missing permission reset and PushPublishing reload

All endpoints require CMS Administrator role and Maintenance portlet access.

Personas

  • Developer Teams (HIGH) — Need REST APIs to build Angular Maintenance portlet
  • System Administrators (HIGH) — Need visibility into cache, threads, sessions, and system health
  • DevOps (MEDIUM) — Can automate maintenance tasks (cache flush, old version cleanup) via API
  • Content Managers (LOW) — Indirect benefit through improved UI performance and reliability

Success Metrics

  • All 19 REST endpoints deployed and tested
  • 1 existing endpoint modification deployed
  • Angular UI can manage all 8 maintenance tabs using REST endpoints
  • Feature parity with existing JSP Maintenance portlet functionality
  • No regressions in cache, index, or system behavior

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.