Expand my Community achievements bar.

SOLVED

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

Avatar

Level 1

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.

1 Accepted Solution

Avatar

Correct answer by
Level 10

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

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

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

Avatar

Administrator

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



Kautuk Sahni