Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

Create AEM Content Package using cURL | AEM Community Blog Seeding

Avatar

Administrator

BlogImage.jpg

Create AEM Content Package using cURL by Rashid jorvee

Abstract

Use case
Create an AEM content package using cURL

cURL to create a package
Below is the syntax and a sample command to create an AEM content package using cURL.

curl -u : -X POST http://localhost:4502/crx/packmgr/service/.json/etc/packages/mycontent.zip?cmd=create -d packageName= -d groupName=

e.g. curl -u admin:admin -X POST http://localhost:4502/crx/packmgr/service/.json/etc/packages/mycontent.zip?cmd=create -d packageName=sample-test-package -d groupName=my_packages

After the successful execution of cURL, you will see a successful message.

{"success":true,"msg":"Package created","path":"/etc/packages/my_packages/sample-test-package.zip"}

Read Full Blog

Create AEM Content Package using cURL

Q&A

Please use this thread to ask the related questions.



Kautuk Sahni
1 Reply

Avatar

Employee Advisor

@kautuk_sahni , thanks for sharing.

 

I would like to share curl command to create dispatcher flush agent -

 

Curl command

curl -u admin:admin -X POST -F "jcr:primaryType=cq:Page" -F "jcr:primaryType=nt:unstructured" -F "jcr:content/jcr:title=Flush Agent 5" -F "jcr:content/sling:resourceType=cq/replication/components/agent" -F "jcr:content/cq:template=/libs/cq/replication/templates/agent" -F "jcr:content/logLevel=error" -F "jcr:content/retryDelay=60000" -F "jcr:content/protocolHTTPMethod=GET" -F "jcr:content/triggerOnOffTime=true" -F "jcr:content/serializationType=flush" -F "jcr:content/transportUri=http://localhost:80/dispatcher/invalidate.cache" -F "jcr:content/protocolHTTPHeaders=CQ-Action:{action}" -F "jcr:content/protocolHTTPHeaders=CQ-Handle:{path}" -F "jcr:content/protocolHTTPHeaders=CQ-Path:{path}" -F "jcr:content/jcr:description=Agent that sends flush requests to the dispatcher." -F "jcr:content/enabled=true" http://localhost:5050/etc/replication/agents.author/flush5

 

 

Output -

DEBAL_DAS_0-1645971301994.pngDEBAL_DAS_1-1645971364843.png

 

DEBAL_DAS_2-1645971435049.png