How to publish/unpublish assets in AEM programatically? | Community
Skip to main content
Level 4
November 22, 2022
Solved

How to publish/unpublish assets in AEM programatically?

  • November 22, 2022
  • 1 reply
  • 1608 views

I am able to upload and update assets in AEM programatically however I wanted to know what's the way to publish or unpublish them? Any docs or references would really help!

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 krati_garg

If this is for On Prem, we do have curl commands for replication. Please explore the below one:
curl -u admin:admin -X POST -F path="/content/geometrixx/en/pag" -F cmd="activate" http://localhost:4502/bin/replicate.json

 

However, on AEMaaCS, I believe, you will have to leverage on Adobe IO and microservices to achieve the usecase

1 reply

krati_garg
Adobe Employee
Adobe Employee
November 22, 2022
Level 4
November 23, 2022

Hi @krati_garg 

 

Can't we have a restful endpoint to send requests? I want to invoke publishing from external APIs and not AEM sdk

krati_garg
Adobe Employee
krati_gargAdobe EmployeeAccepted solution
Adobe Employee
November 23, 2022

If this is for On Prem, we do have curl commands for replication. Please explore the below one:
curl -u admin:admin -X POST -F path="/content/geometrixx/en/pag" -F cmd="activate" http://localhost:4502/bin/replicate.json

 

However, on AEMaaCS, I believe, you will have to leverage on Adobe IO and microservices to achieve the usecase