Skip to content

[FEATURE] Category REST API Endpoint to allow reparenting. #33989

Description

@nathan-hildebrandt

Problem

Currently, the Category REST API Endpoint does not allow updating the parent of a category.

Goal

Users will be able to run a PUT ..../api/v1/categories which should allow a "parent": key to update the inode of the parent. Currently it accepts "parent" but it doesn't actually update anything. Here is an example body I used to try this on my local environment using demo data. This is attempting to change the parent from "Age or Gender" to "Categories". However, it remained under Age or Gender.

{
"inode": "824be246-15f2-4afe-a306-4d4d1350d6a2",
"categoryName": "Boys",
"categoryVelocityVarName": "boys",
"key": "boys",
"description": null,
"keywords": "",
"sortOrder": 0,
"active": true,
"siteId": "",
"parent": "9fa0ab8b-f4d6-4784-88ad-3ed7616bd220"
}

Target Personas

  • Developer teams
  • Content teams
  • DevOps teams
  • System administrators (dotCMS)

Demo Expectations

Show a statement through Postman that fires off successfully, and show in the dotCMS UI that it successfully updated the Parent category of a child category.

Acceptance Criteria

PUT REST API endpoint /api/v1/categories should allow for reparenting of child categories for restructuring purposes.

User Stories

No response

Links

https://dotcms.freshdesk.com/a/tickets/34365

Metadata

Metadata

Assignees

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions