Skip to main content
Level 4
Nov 22, 2022 2:14 AM UTC
Solved

How to publish/unpublish assets in AEM programatically?

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.
krati_garg
krati_gargAccepted solution
Adobe Employee
Nov 23, 2022 10:07 AM UTC

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

3 replies

krati_garg
Adobe Employee
Adobe Employee
Nov 22, 2022 7:12 AM UTC
Level 4
Nov 23, 2022 6:37 AM UTC

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

Translate
krati_garg
Adobe Employee
krati_gargAdobe EmployeeAccepted solution
Adobe Employee
Nov 23, 2022 10:07 AM UTC

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

Translate