How to create an AEM filtered package with CURL

The AEM native CURL API does not allow to create a filtered package, but you can use the following workaround to do it 🙂

The scheme package

What is it ? The scheme package will be a filtered package without content.

First of all you need to create the filtered package on your local environment and download it. Unzip the previous package on your computer. It should contain two folders (jcr_root and META-INF). You need to remove the content of the jcr_root folder. The previous operation allow us to remove the content of the package. Endly you need to zip jcr_root and META-INF folders to create our empty package which will be uploaded via a curl command.

Curl process

The following command allow you to upload the scheme package on the aem environment :

After few seconds, your package will be uploaded on AEM and you will be able to build it :

And download it :


Warning: count(): Parameter must be an array or an object that implements Countable in /homepages/37/d447437781/htdocs/aemtuts/wp-includes/class-wp-comment-query.php on line 405


  1. You can also just post the resources for the filter. This approach does not require anything but cURL and lets you automatte the whole process.

Leave a Reply