Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

How to publish/unpublish assets in AEM programatically?

Avatar

Level 5

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!

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

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

View solution in original post

3 Replies

Avatar

Level 5

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

Avatar

Correct answer by
Employee Advisor

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