How rename JCR node name using curl command. | Community
Skip to main content
December 17, 2020
Solved

How rename JCR node name using curl command.

  • December 17, 2020
  • 2 replies
  • 4160 views

How rename JCR node name using curl command. as we have almost 600 nodes should be renamed. please provide best way to rename the node name.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by shelly-goel

@cthantap1 

You would basically have to use the move command to rename the nodes.

Here's the CURL command to rename/ move a content node. You can create a script with all the nodes that needs to be renamed with their before and after content paths.
curl -u admin:admin --header "Referer:http://localhost:4502/" -F":diff=>/apps/test1 : /apps/test2" http://localhost:4502/crx/server/crx.default/jcr%3aroot

Below is the list of all the curl commands and you can refer to the move command in it:
https://experienceleague.adobe.com/docs/experience-manager-65/administering/operations/curl.html?lang=en#common-content-manipulation-aem-curl-commands
curl -u <user>:<password> -F":operation=move" -F":applyTo=/sourceurl/oldname" -F":dest=/sourceurl/newname" https://localhost:4502/content

2 replies

Kunal_Gaba_
December 19, 2020

You can use ACS common Page Relocator tool of ACS commons to rename pages in bulk https://adobe-consulting-services.github.io/acs-aem-commons/features/mcp/subpages/tools.html 

 

shelly-goel
Adobe Employee
shelly-goelAdobe EmployeeAccepted solution
Adobe Employee
December 21, 2020

@cthantap1 

You would basically have to use the move command to rename the nodes.

Here's the CURL command to rename/ move a content node. You can create a script with all the nodes that needs to be renamed with their before and after content paths.
curl -u admin:admin --header "Referer:http://localhost:4502/" -F":diff=>/apps/test1 : /apps/test2" http://localhost:4502/crx/server/crx.default/jcr%3aroot

Below is the list of all the curl commands and you can refer to the move command in it:
https://experienceleague.adobe.com/docs/experience-manager-65/administering/operations/curl.html?lang=en#common-content-manipulation-aem-curl-commands
curl -u <user>:<password> -F":operation=move" -F":applyTo=/sourceurl/oldname" -F":dest=/sourceurl/newname" https://localhost:4502/content

cthantap1Author
December 22, 2020
Thanks for the update @shelly-goel