Adobe DAM server extractiong the zip file and activate the assets using curl | Community
Skip to main content
December 16, 2019
Solved

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

  • December 16, 2019
  • 2 replies
  • 1503 views

Hi, 

 

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.

 

 

Thanks.

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 Nirmal_Jose

Hi,

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="samplepackage.zip" -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/samplepackage.zip?cmd=replicate

 

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

 

2 replies

Nirmal_Jose
Adobe Employee
Nirmal_JoseAdobe EmployeeAccepted solution
Adobe Employee
December 16, 2019

Hi,

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="samplepackage.zip" -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/samplepackage.zip?cmd=replicate

 

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

 

Adobe Employee
December 17, 2019

You can look into creating the CURL command when you try to extract a sample file from the assets UI. Check [1] for more details. 

 

[1] https://helpx.adobe.com/experience-manager/6-3/sites/administering/using/curl.html#BuildingacURLReadyAEMCommand