Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

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

Avatar

Level 4

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
 
1 Accepted Solution

Avatar

Correct answer by
Level 9

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

View solution in original post

2 Replies

Avatar

Correct answer by
Level 9

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

Avatar

Level 4

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 ?