Skip to content

Conversation

@eiresendez
Copy link
Contributor

@eiresendez eiresendez commented Jan 9, 2026

Issue & Reproduction Steps

Admins need an API endpoint to delete Cases and their related Requests, as described in the product document. The absence of this endpoint forces manual cleanup and can leave inconsistent data.

Solution

  • Introduce a REST endpoint to delete a Case and all related Requests.
  • Ensure the operation removes dependent records tied to the case (core records first, dependencies later).
  • Enforce token-based access, and return proper HTTP statuses (204 success, 404 missing case, 401 unauthenticated, 409/500 on failures).
  • Keep the controller implementation clean and aligned with ProcessMaker API conventions.

How to Test

  • With a valid API token, call DELETE /api/1.0/cases/{case_number} for an existing case and verify it is no longer retrievable.
  • Call the same endpoint for a non-existent case and verify 404 is returned.
  • Verify that all requests linked to the case are removed and no orphaned records remain.

Related Tickets & Packages

@processmaker-sonarqube
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants