curl command - how to set MULTI VALUE property (like String []) | Community
Skip to main content
New Participant
October 16, 2015
Solved

curl command - how to set MULTI VALUE property (like String [])

  • October 16, 2015
  • 2 replies
  • 3208 views

Hi all,

 
I am using CURL command to create pages in CQ. This page node has property which takes Multi Value. So in CRX I can see its type is coming as "String[]" instead of just "String". When I use CURL command by default CURL sets everything to "String" . How do I pass the DATA TYPE of the property using CURL command or how do i set MULTI VALUE property using CURL command
 
 
curl -u admin:admin -F "jcr:primaryType=cq:Page" -F "jcr:content/jcr:primaryType=cq:PageContent" -F "jcr:content/jcr:title=New Page" -F "jcr:content/sling:resourceType=geometrixx/components/contentpage"  -F "jcr:content/myMultiValue=value1,value2"   http://localhost:4502/content/geometrixx/en/page
 
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 Mshaji

Try this

curl -u admin:admin -F "jcr:primaryType=cq:Page" -F "jcr:content/jcr:primaryType=cq:PageContent" -F "jcr:content/jcr:title=New Page" -F "jcr:content/sling:resourceType=geometrixx/components/contentpage"  -F "jcr:content/myMultiValue=value1"   -F "jcr:content/myMultiValue=value2"  http://localhost:4502/content/geometrixx/en/page

2 replies

MshajiAccepted solution
New Participant
October 16, 2015

Try this

curl -u admin:admin -F "jcr:primaryType=cq:Page" -F "jcr:content/jcr:primaryType=cq:PageContent" -F "jcr:content/jcr:title=New Page" -F "jcr:content/sling:resourceType=geometrixx/components/contentpage"  -F "jcr:content/myMultiValue=value1"   -F "jcr:content/myMultiValue=value2"  http://localhost:4502/content/geometrixx/en/page

New Participant
October 16, 2015

Hi Mshajiahmed,

Thanks so much. Yes this worked. It created "String []" in CRX.

And how do we specify other DATATYPES in CURL command:

For example:

Date

Boolean

Binary 

Decimal

Double

All these options I see in CRX when you try adding a property to node using CRX.

Where I can get info on these ?