Need help on package creation using curl - when the group name has space in it. | Community
Skip to main content
New Participant
Jul 26, 2017 12:24 PM UTC
Solved

Need help on package creation using curl - when the group name has space in it.

Hello,

I am able to create the package , but unable to add filters to it when the group name has " " between them. Example is given as below.

curl -u admin:admin -X POST http://HOST_NAME:PORT_NO/crx/packmgr/update.jsp \-F path=/etc/packages/my_packages/testpackage.zip -F packageName=testpackage \-F groupName=my_packages \-F filter="[{\"root\" : \"/content/we-retail\", \"rules\": [{\"modifier\" : \"exclude\", \"pattern\" : \"/content/we-retail/(.*)/folder-to-exclude(/.*)?\"}]}]" \-F '_charset_=UTF-8' -- Working

curl -u admin:admin -X POST http://HOST_NAME:PORT_NO/crx/packmgr/update.jsp \-F path=/etc/packages/my packages/testpackage.zip -F packageName=testpackage \-F groupName=my packages \-F filter="[{\"root\" : \"/content/we-retail\", \"rules\": [{\"modifier\" : \"exclude\", \"pattern\" : \"/content/we-retail/(.*)/folder-to-exclude(/.*)?\"}]}]" \-F '_charset_=UTF-8'  -- Not working

Creation of package using curl works " " is replaced by %20. But the same option doesn't work when I try to add filters to the package that is created. Any insight to this will be helpful.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
smacdonald2008
smacdonald2008Accepted solution
Level 10
Jul 26, 2017 6:00 PM UTC

I do not think spaces in this use case are supported.

2 replies

kautuk_sahni
Employee
Jul 28, 2017 6:34 AM UTC

Not tested though...

But try

TRY 1. groupName="my packages"

TRY 2. 'groupName=my packages'

TRY 3. groupName=my%20packages

TRY4.  'groupName=my%20packages'

And samefor Path

I guess %encoding should work here.

~kautuk

Translate
Kautuk Sahni
smacdonald2008
smacdonald2008Accepted solution
Level 10
Jul 26, 2017 6:00 PM UTC

I do not think spaces in this use case are supported.

Translate