Need help on package creation using curl - when the group name has space in it. | Community
Skip to main content
July 26, 2017
Solved

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

  • July 26, 2017
  • 2 replies
  • 718 views

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.
Best answer by smacdonald2008

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

2 replies

smacdonald2008
smacdonald2008Accepted solution
Level 10
July 26, 2017

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

kautuk_sahni
Community Manager
Community Manager
July 28, 2017

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