dotCMS / dotCMS/core

[FEATURE] Add PATCH endpoint for partial user updates

Open
#34,283 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

OKR : Customer Support stale Team : Maintenance
Dominant language
Java
Stars
970
Forks
486
Avg merge
3d 33m
Merged PRs (30d)
170

Description

Problem

The current PUT /api/v1/users endpoint requires all mandatory fields (userId, firstName, lastName, email) even when updating a single field. This creates unnecessary complexity for API consumers.
Current behavior:
PUT /api/v1/users { "userId": "dotcms.org.2806", "firstName": "John", // Required even if not changing "lastName": "Doe", // Required even if not changing "email": "new@email.com" // The only field being updated }

Goal

Proposed Solution
Add a PATCH /api/v1/users endpoint that supports partial updates, allowing users to update only specific fields.

New behavior:
PATCH /api/v1/users{   
 "userId": "dotcms.org.2806",   
 "email": "new@email.com"   // Only send what's changing
}

Target Personas
  • Developer teams
  • Content teams
  • DevOps teams
  • System administrators (dotCMS)
Demo Expectations

Able to use update user

Acceptance Criteria
  • PATCH endpoint accepts userId + any optional user fields
    -Unspecified fields retain existing values
  • Email, firstName, lastName, and password can each be updated independently
User Stories

No response

Links

https://helpdesk.dotcms.com/a/tickets/33011

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.

Research direction

Start by locating the existing PUT /api/v1/users implementation and its user update tests. Trace how required fields are validated and persisted, then add the PATCH behavior described in the acceptance criteria and verify that omitted fields retain their existing values while email, firstName, lastName, and password can be updated independently.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.