Adobe DAM server extractiong the zip file and activate the assets using curl





I have a requirement to upload the zip file, and extract it in dam server and activate the assets using curl. Currently I'm able to upload the zip file using curl, but I'm unable to extract it with curl, here I'm using bash script to upload the files but seems like most of the community using the java.

Could you guide me, is it possible to extract the zip in DAM server.




Accepted Solutions (1)

Accepted Solutions (1)





If its an AEM package itself, then you can do it two ways.


1. Upload, Install and replicate

a. upload & install
curl -u admin:admin -F file=@"name of zip file" -F name="" -F force=true -F install=true http://localhost:4502/crx/packmgr/service.jsp

b. replicate

curl -u admin:admin -X POST  http://localhost:4502/crx/packmgr/service/.json/etc/packages/my_packages/


2. Upload, Install in author and publisher instances separately

Use curl of 1.a itself 


If your requirement is just to have assets and not as an AEM package, you need to do it asset by asset.

1. Upload an Asset(Ex: test.png)
curl -u admin:admin -X POST -F file=@"test.png" http://localhost:4502/content/dam/geometrixx/portraits.createasset.html

2. Activate the asset

curl -u admin:admin -X POST -F path="/content/dam/geometrixx/portraits/test.png" -F cmd="activate" http://localhost:4502/bin/replicate.json