Running CURL command on AEM Publisher Instance | Community
Skip to main content
August 4, 2023
Solved

Running CURL command on AEM Publisher Instance

  • August 4, 2023
  • 2 replies
  • 1524 views

I am in the middle of converting some of project folders from nt:folder to Sling:Folder inorder to set some custom folder schema to it, 

I am able to change it successfully in Author. 

I am not able to run the same CURL command in my Publisher Instance ,getting 404 even though particular path is present in the instance.

 

Anything I am missing above ?

 

curl -v -u "username":"password" -F"jcr:primaryType"="sling:Folder" publisherURLLink

 

 

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 Rohit_Utreja

@poovithaselvaraj 

Try unpublishing the content and publishing it again.

It will make the content unavailable for a while in publisher but it will update all nodes.

Given that, unavailability for few minutes is not an issue!

2 replies

aanchal-sikka
Community Advisor
Community Advisor
August 4, 2023

Hello @poovithaselvaraj 

 

Please try publishing these paths, rather than updating in publish via curl command.

 

curl -u admin:admin -X POST -F path=“/content/path/to/page?lang=en” -F cmd=“activate” http://localhost:4502/bin/replicate.json 

Aanchal Sikka
August 4, 2023

Hi , 

I was not able to publish since in Publisher it is still nt:folder and when I am publishing , it is giving oak contraint exception
error: com.day.cq.replication.ReplicationException: Repository error during node import: OakConstraint0025: <Path>[[nt:folder, cq:ReplicationStatus]]: Unexpected child node 'jcr:content' of effective type '[nt:unstructured]' found in a new node

 

Thanks,

Poovitha S

aanchal-sikka
Community Advisor
Community Advisor
August 4, 2023

@poovithaselvaraj 

 

Which type of an instance is it? AMS or Cloud?

 

If AMS, can you please login to publish using the same/admin creds? Please access http://localhost:4502/useradmin and check the type of access this user has

Aanchal Sikka
Rohit_Utreja
Community Advisor
Rohit_UtrejaCommunity AdvisorAccepted solution
Community Advisor
August 4, 2023

@poovithaselvaraj 

Try unpublishing the content and publishing it again.

It will make the content unavailable for a while in publisher but it will update all nodes.

Given that, unavailability for few minutes is not an issue!

August 4, 2023

Thanks @rohit_utreja, this one worked :).

 

kautuk_sahni
Community Manager
Community Manager
June 7, 2024

@poovithaselvaraj We hope you found the AEM community valuable. We anticipate your return as either a learner or a contributor. The community benefits from SMEs like you. Please ask your AEM peers to join and contribute. Happy AEM learning!

Kautuk Sahni